Package rife.cmf.dam.contentmanagers
Class DatabaseContentInfo
java.lang.Object
rife.validation.Validation
rife.cmf.ContentInfo
rife.cmf.dam.contentmanagers.DatabaseContentInfo
- All Implemented Interfaces:
Cloneable,Constrained,ConstrainedPropertyListener,Validated
This class adds additional properties to the
ContentInfo class
to be able to store the data in a database.- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called at least once and maximum once when any method related to Validated rules, subjects and group or Constrained properties are used.intRetrieves the ID of the storedContentinstance.voidsetContentId(int contentId) Sets the ID of the storedContentinstance.Methods inherited from class rife.cmf.ContentInfo
getAttribute, getAttributes, getCreated, getFormattedSize, getMimeType, getName, getOptimalPath, getPath, getProperties, getProperty, getSize, getVersion, hasAttribute, hasAttributes, hasName, hasProperties, hasProperty, isFragment, setAttributes, setCreated, setFragment, setMimeType, setName, setPath, setProperties, setSize, setVersionMethods inherited from class rife.validation.Validation
addConstrainedPropertyRules, addConstraint, addConstraint, addGroup, addRule, addValidationError, clone, constraintSet, countValidationErrors, focusGroup, generateConstrainedPropertyRules, getConstrainedBean, getConstrainedProperties, getConstrainedProperty, getErrorIndication, getGroup, getGroups, getLoadingErrors, getRules, getValidatedSubjects, getValidationErrors, hasPropertyConstraint, isSubjectValid, limitSubjectErrors, makeErrorValid, makeSubjectValid, provideValidatedBean, replaceValidationErrors, resetGroup, resetValidation, retrieveValidatedBean, unlimitSubjectErrors, validate, validate, validateGroup, validateGroup
-
Constructor Details
-
DatabaseContentInfo
public DatabaseContentInfo()Instantiates a newDatabaseContentInfoinstance.
-
-
Method Details
-
activateValidation
public void activateValidation()Description copied from class:ValidationThis method is called at least once and maximum once when any method related to Validated rules, subjects and group or Constrained properties are used.By overriding this method, you can thus isolate all the validation setup code and don't enforce a performance penalty at each object construction when doing it in the default constructor.
- Overrides:
activateValidationin classContentInfo
-
setContentId
public void setContentId(int contentId) Sets the ID of the storedContentinstance.This ID will not be used to refer to the Content instance from outside the backend. The path and the version should be used for this instead.
- Parameters:
contentId- the ID of theContentinstance- See Also:
-
getContentId
public int getContentId()Retrieves the ID of the storedContentinstance.- Returns:
- the
Content's ID - See Also:
-