|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.core.content.PersistentObject
org.liquidsite.core.content.Domain
A resource and user domain.
| Field Summary | |
static java.lang.String |
HOST_NAME_CHARS
The permitted host name characters. |
static java.lang.String |
NAME_CHARS
The permitted domain name characters. |
| Fields inherited from class org.liquidsite.core.content.PersistentObject |
BINDERS, LOWER_CASE, NUMBERS, UPPER_CASE |
| Constructor Summary | |
Domain(ContentManager manager,
java.lang.String name)
Creates a new domain with default values. |
|
| Method Summary | |
void |
addHost(java.lang.String name,
java.lang.String description)
Adds or overwrites a host in the domain. |
int |
compareTo(Domain domain)
Compares this object with the specified domain for order. |
int |
compareTo(java.lang.Object obj)
Compares this object with the specified object for order. |
protected void |
doDelete(DataSource src,
User user)
Deletes the object data from the database. |
protected void |
doInsert(DataSource src,
User user,
boolean restore)
Inserts the object data into the database. |
protected void |
doUpdate(DataSource src,
User user)
Updates the object data in the database. |
protected void |
doValidate()
Validates the object data before writing to the database. |
boolean |
equals(java.lang.Object obj)
Checks if this domain equals another object. |
java.util.Date |
getCreatedDate()
Returns the domain creation date. |
java.lang.String |
getDescription()
Returns the domain description. |
java.io.File |
getDirectory()
Returns the domain file directory. |
java.util.ArrayList |
getHosts()
Returns the hosts belonging to this domain. |
java.lang.String |
getMailFrom()
Returns the mail sender address. |
java.util.Date |
getModifiedDate()
Returns the domain last modification date. |
java.lang.String |
getName()
Returns the unique domain name. |
PermissionList |
getPermissions()
Returns the permission list applicable to this domain object. |
java.util.ArrayList |
getSize()
Calculates the approximate size of a domain per category. |
void |
removeAllHosts()
Removes all hosts belonging to the domain. |
void |
removeHost(java.lang.String name)
Removes a host belonging to the domain. |
void |
setDescription(java.lang.String description)
Sets the domain description. |
void |
setMailFrom(java.lang.String address)
Sets the mail sender address. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class org.liquidsite.core.content.PersistentObject |
decodeMap, delete, delete, encodeMap, getContentManager, hasAdminAccess, hasPublishAccess, hasReadAccess, hasWriteAccess, isPersistent, restore, restore, save, save, validateChars, validateSize |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String NAME_CHARS
public static final java.lang.String HOST_NAME_CHARS
| Constructor Detail |
public Domain(ContentManager manager,
java.lang.String name)
manager - the content manager to usename - the domain name| Method Detail |
public boolean equals(java.lang.Object obj)
obj - the object to compare with
public int compareTo(java.lang.Object obj)
throws java.lang.ClassCastException
compareTo in interface java.lang.Comparableobj - the object to compare to
java.lang.ClassCastException - if the object isn't a Domain objectpublic int compareTo(Domain domain)
domain - the domain to compare to
public java.lang.String toString()
public java.lang.String getName()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - the new descriptionpublic java.util.Date getCreatedDate()
public java.util.Date getModifiedDate()
public java.lang.String getMailFrom()
public void setMailFrom(java.lang.String address)
address - the new address, or null to removeInternetAddress
public PermissionList getPermissions()
throws ContentException
ContentException - if the database couldn't be accessed
properlypublic java.util.ArrayList getHosts()
DomainHost
public void addHost(java.lang.String name,
java.lang.String description)
name - the host namedescription - the host descriptionpublic void removeHost(java.lang.String name)
name - the host namepublic void removeAllHosts()
public java.io.File getDirectory()
throws ContentException
ContentException - if the domain file directory wasn't
found or couldn't be created
public java.util.ArrayList getSize()
throws ContentException
ContentException - if the database couldn't be accessed
properlyDomainSize
protected void doValidate()
throws ContentException
doValidate in class PersistentObjectContentException - if the object data wasn't valid
protected void doInsert(DataSource src,
User user,
boolean restore)
throws ContentException
doInsert in class PersistentObjectsrc - the data source to useuser - the user performing the operationrestore - the restore flag
ContentException - if the database couldn't be accessed
properly
protected void doUpdate(DataSource src,
User user)
throws ContentException
doUpdate in class PersistentObjectsrc - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
protected void doDelete(DataSource src,
User user)
throws ContentException
doDelete in class PersistentObjectsrc - 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 | ||||||||||