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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is called at least once and maximum once when any method related to Validated rules, subjects and group or Constrained properties are used.int
Retrieves the ID of the storedContent
instance.void
setContentId
(int contentId) Sets the ID of the storedContent
instance.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, setVersion
Methods 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 newDatabaseContentInfo
instance.
-
-
Method Details
-
activateValidation
public void activateValidation()Description copied from class:Validation
This 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:
activateValidation
in classContentInfo
-
setContentId
public void setContentId(int contentId) Sets the ID of the storedContent
instance.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 theContent
instance- See Also:
-
getContentId
public int getContentId()Retrieves the ID of the storedContent
instance.- Returns:
- the
Content
's ID - See Also:
-