|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.core.content.PersistentObject
A persistent object.
| Field Summary | |
protected static java.lang.String |
BINDERS
The ASCII binding separator characters. |
protected static java.lang.String |
LOWER_CASE
The ASCII lower-case characters. |
protected static java.lang.String |
NUMBERS
The ASCII numerical characters. |
protected static java.lang.String |
UPPER_CASE
The ASCII upper-case characters. |
| Constructor Summary | |
protected |
PersistentObject(ContentManager manager,
boolean persistent)
Creates a new persistent object. |
| Method Summary | |
protected static java.util.HashMap |
decodeMap(java.lang.String str)
Decodes a string into a map. |
void |
delete(DataSource src,
User user)
Deletes this object from the database. |
void |
delete(User user)
Deletes this object from the database. |
protected abstract void |
doDelete(DataSource src,
User user)
Deletes the object data from the database. |
protected abstract void |
doInsert(DataSource src,
User user,
boolean restore)
Inserts the object data into the database. |
protected abstract void |
doUpdate(DataSource src,
User user)
Updates the object data in the database. |
protected abstract void |
doValidate()
Validates the object data before writing to the database. |
protected static java.lang.String |
encodeMap(java.util.HashMap map)
Encodes a map into a string. |
ContentManager |
getContentManager()
Returns the content manager used by this object. |
boolean |
hasAdminAccess(User user)
Checks the admin access for a user. |
boolean |
hasPublishAccess(User user)
Checks the publish access for a user. |
boolean |
hasReadAccess(User user)
Checks the read access for a user. |
boolean |
hasWriteAccess(User user)
Checks the write access for a user. |
boolean |
isPersistent()
Checks if this object is persistent. |
void |
restore(DataSource src,
User user)
Restores this object to the database. |
void |
restore(User user)
Restores this object to the database. |
void |
save(DataSource src,
User user)
Saves this object to the database. |
void |
save(User user)
Saves this object to the database. |
protected static void |
validateChars(java.lang.String name,
java.lang.String value,
java.lang.String chars)
Checks a field value for invalid characters. |
protected static void |
validateSize(java.lang.String name,
java.lang.String value,
int minLength,
int maxLength)
Checks a field value size. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String UPPER_CASE
protected static final java.lang.String LOWER_CASE
protected static final java.lang.String NUMBERS
protected static final java.lang.String BINDERS
| Constructor Detail |
protected PersistentObject(ContentManager manager,
boolean persistent)
manager - the content manager to usepersistent - the persistent flag| Method Detail |
protected static java.lang.String encodeMap(java.util.HashMap map)
map - the map to encode
decodeMap(java.lang.String)protected static java.util.HashMap decodeMap(java.lang.String str)
str - the encoded string
encodeMap(java.util.HashMap)
protected static void validateSize(java.lang.String name,
java.lang.String value,
int minLength,
int maxLength)
throws ContentException
name - the field namevalue - the field value to checkminLength - the minimum lengthmaxLength - the maximum length
ContentException - if the field value was too short or
too long
protected static void validateChars(java.lang.String name,
java.lang.String value,
java.lang.String chars)
throws ContentException
name - the field namevalue - the field value to checkchars - the allowed characters
ContentException - if the field value contained invalid
characterspublic boolean isPersistent()
public final boolean hasReadAccess(User user)
throws ContentException
user - the user to check, or null for none
ContentException - if the database couldn't be accessed
properly
public final boolean hasWriteAccess(User user)
throws ContentException
user - the user to check, or null for none
ContentException - if the database couldn't be accessed
properly
public final boolean hasPublishAccess(User user)
throws ContentException
user - the user to check, or null for none
ContentException - if the database couldn't be accessed
properly
public final boolean hasAdminAccess(User user)
throws ContentException
user - the user to check, or null for none
ContentException - if the database couldn't be accessed
properlypublic ContentManager getContentManager()
public final void save(User user)
throws ContentException,
ContentSecurityException
user - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
public final void save(DataSource src,
User user)
throws ContentException,
ContentSecurityException
src - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
public final void restore(User user)
throws ContentException,
ContentSecurityException
user - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
public final void restore(DataSource src,
User user)
throws ContentException,
ContentSecurityException
src - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
public final void delete(User user)
throws ContentException,
ContentSecurityException
user - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
public final void delete(DataSource src,
User user)
throws ContentException,
ContentSecurityException
src - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
protected abstract void doValidate()
throws ContentException
ContentException - if the object data wasn't valid
protected abstract void doInsert(DataSource src,
User user,
boolean restore)
throws ContentException
src - the data source to useuser - the user performing the operationrestore - the restore flag
ContentException - if the database couldn't be accessed
properly
protected abstract void doUpdate(DataSource src,
User user)
throws ContentException
src - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
protected abstract void doDelete(DataSource src,
User user)
throws ContentException
src - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||