public abstract class Data extends BasicStorable implements JcmsConstants, ImportConstants, LangPropertyArgument
Modifier and Type | Class and Description |
---|---|
static class |
Data.AuthorComparator<T extends Data> |
static class |
Data.AuthorSelector |
static class |
Data.CdateSelector
DataSelector to select Data which have
a creation date between the given begin and end Date . |
static class |
Data.DataNameComparator<T extends Data>
This comparator compares two Data using their Data Name.
|
static class |
Data.DeletableSelector
DataSelector to select Data that
can be deleted (i.e. data whose checkDelete() returns ok). |
static class |
Data.ImportSelector
DataSelector to select Data which have
been imported. |
static class |
Data.MdateSelector
DataSelector to select Data which have
a modification date between the given begin and end Date . |
static class |
Data.OpAuthorComparator<T extends Data> |
static class |
Data.RowIdComparator<T extends Data> |
static class |
Data.StrongLockSelector
|
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable>
Modifier and Type | Field and Description |
---|---|
protected Member |
author |
protected java.lang.String |
authorDBID |
protected static Channel |
channel |
static java.lang.String |
DISPLAY_URL_EXTRA_INFO
Extra info to key to override default display URL String.
|
protected DataExtension |
extension |
protected java.util.HashMap<java.lang.String,java.lang.String> |
extraDataMap |
protected java.util.Map<java.lang.String,java.lang.String> |
extraDBDataMapToSaveOnOp |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
importMap |
protected Member |
opAuthor |
protected Member |
opDelegate |
static java.lang.String |
REVISION |
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG
Constructor and Description |
---|
Data() |
Data(Data other) |
Data(Member author,
DataExtension extension) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRequestUnlock(Member mbr)
Returns true if the given member can request to unlock this document.
|
ControllerStatus |
checkCreate(Member mbr)
Checks if the creation can be performed
|
ControllerStatus |
checkCreate(Member mbr,
java.util.Map context)
Checks if the creation can be performed
|
ControllerStatus |
checkDelete(Member mbr)
Checks if the deletion can be performed
|
ControllerStatus |
checkDelete(Member mbr,
java.util.Map context)
Checks if the deletion can be performed
|
ControllerStatus |
checkIntegrity()
Checks whether or not data integrity constraints are respected.
|
ControllerStatus |
checkIntegrity(java.util.Map context)
Checks whether or not data integrity constraints are respected.
|
boolean |
checkLockMember(Member mbr)
Returns true if the given member has locked the given data or if the data is not locked.
|
ControllerStatus |
checkMember(int op,
Member mbr,
java.util.Map context)
Checks if the given member can perform the given operation.
|
boolean |
checkStrongLockMember(Member mbr)
Check if the specified member has locked this Data or if the Data is not locked.
|
ControllerStatus |
checkUpdate(Member mbr)
Checks if the update can be performed
|
ControllerStatus |
checkUpdate(Member mbr,
java.util.Map context)
Checks if the update can be performed
|
ControllerStatus |
checkWrite(int op,
Member mbr,
boolean checkIntegrity,
java.util.Map context)
Checks if the given write operation can be performed
|
java.lang.Object |
clone() |
protected java.lang.String[] |
computeDBIDArray(Data[] array)
Extract the DBData from the given array and return an array of identifier of those DBData.
|
java.lang.String |
exportXml()
Returns the XML export this data.
|
java.lang.String |
exportXml(java.lang.String[] relateds)
Returns the XML export this data.
|
java.lang.StringBuffer |
exportXml(java.lang.StringBuffer sb,
java.lang.String[] relateds)
Fill the given StringBuffer with the XML export this data.
|
java.lang.StringBuffer |
exportXml(java.lang.StringBuffer sb,
java.lang.String[] relateds,
int indentLevel)
Fill the given StringBuffer with the XML export this data.
|
void |
exportXmlField(java.lang.StringBuffer sb,
int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data.
|
void |
exportXmlRelated(java.lang.StringBuffer sb,
java.lang.String[] relateds,
int indentLevel)
Fills the given StringBuffer with Xml export of related of this data.
|
protected void |
exportXmlRelated(java.lang.StringBuffer sb,
java.lang.String related,
int indentLevel) |
void |
fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
Fill the given string buffer with specific attributes of this data.
|
java.util.TreeSet |
getAllReferrerSet()
Return all the referrers of this data
|
java.util.TreeSet |
getAllReferrerSet(java.lang.Class referrerClass)
Return all the referrers of this data, instance of the given class
|
static TypeFieldEntry[] |
getAllTypeFieldEntry()
Return an array of
TypeFieldEntry bound to Data . |
Member |
getAuthor()
Returns the author of this Data.
|
Member |
getAuthor(boolean queryDB)
Returns the author of this Data.
|
static <T extends Data> |
getAuthorComparator(java.util.Comparator<Member> memberComparator) |
java.lang.String |
getAuthorDBID()
Returns a JCMS ID of the author if it is persisted in the DB.
|
java.lang.String |
getAuthorId()
Returns the JStore ID of the author (only for DBData)
|
static DataSelector |
getAuthorSelector(Member author) |
boolean |
getBooleanFieldValue(JcmsJspContext ctxt,
java.lang.String fieldName)
Gets the boolean value of the specified field name for this
Data . |
boolean |
getBooleanFieldValue(java.lang.String fieldName)
Gets the value of the given
boolean field name for the current Data . |
static <T extends Data> |
getCaddyComparator() |
java.util.TreeSet<Category> |
getCategoryFieldValue(JcmsJspContext ctxt,
java.lang.String fieldName)
Gets the Category value of the specified field name for this
Data . |
java.util.TreeSet |
getCategoryFieldValue(java.lang.String fieldName,
Member mbr)
Gets the value of the given
Category field name for the current Data . |
static Data.CdateSelector |
getCdateSelector(java.util.Date begin,
java.util.Date end) |
static <T extends Data> |
getComparator(java.lang.String str,
boolean reverse)
Deprecated.
|
static java.lang.String |
getCSVHeader(java.lang.String lang)
Returns the CSV header of this object
|
java.lang.String |
getDataIcon()
Returns source information for the icon associated to this Data, either a relative path or sprite classes name.
|
java.lang.String |
getDataIconAlt(java.lang.String lang)
Returns the alternative text (alt attribute) to use in the HTML IMG tag of this Data's icon.
|
java.lang.String |
getDataIconHtml()
Returns the HTML code of the icon for this data in the current user language.
|
java.lang.String |
getDataIconHtml(java.lang.String lang)
Returns the HTML code of the icon for this data in the specified language.
|
java.lang.String |
getDataIconTitle(java.lang.String lang)
Returns the icon's tooltip.
|
java.lang.String |
getDataImage()
Retrieves the image path of this data in the channel's main language.
|
java.lang.String |
getDataImage(java.lang.String lang)
Retrieves the image path of this data in the specified language.
|
java.lang.String |
getDataImage(java.lang.String lang,
boolean useDefault)
Retrieves the image path of this data.
|
java.lang.String |
getDataName(java.lang.String language)
Return the name of this Data, every sub class Data which will be displayed to user should
implements this method already.
|
static <T extends Data> |
getDataNameComparator(java.lang.String language) |
java.util.Date |
getDate(java.lang.String dateType)
Return the date corresponding to the given parameter :
date/cdate, mdate or null if nothing match or the matching date
is null.
|
java.util.Date |
getDate(java.lang.String dateType,
java.util.Date defaultDate)
Return the date corresponding to the given parameter :
date/cdate, mdate, or null if nothing match or the matching date
is null.
|
static DataSelector |
getDateSelector(java.lang.String str,
java.util.Date begin,
java.util.Date end)
Retrieves a new
DataSelector given a name representing
it. |
static DataSelector |
getDeletableSelector(Member opAuthor) |
java.lang.String |
getDisplayLink(java.util.Locale locale)
Retrieve an HTML a tag suitable to display this Data
|
java.lang.String |
getDisplayLink(java.util.Locale locale,
java.lang.String baseURL)
Retrieve an HTML a tag suitable to display this Data
|
java.lang.String |
getDisplayLink(java.util.Locale locale,
java.lang.String baseURL,
java.lang.String params,
java.lang.String anchor,
java.lang.String title,
java.lang.String accessibilityInfo,
java.lang.String css,
java.lang.String htmlAttributes)
Retrieve an HTML a tag suitable to display this Data
|
java.lang.String |
getDisplayUrl(java.util.Locale locale)
Return the URL to access this data in the front office.
|
double |
getDoubleFieldValue(JcmsJspContext ctxt,
java.lang.String fieldName)
Gets the double value of the specified field name for this
Data . |
double |
getDoubleFieldValue(java.lang.String fieldName)
Gets the value of the given
double field name for the current Data . |
java.lang.String |
getExportXmlDataValue()
Returns a string representation of this data used by exportXml().
|
DataExtension |
getExtension()
Get the value of extension.
|
java.lang.String |
getExtraData(java.lang.String name)
Returns the value of the named extra data as an
String ,
or null if no extra info of the given name exists. |
java.util.HashMap<java.lang.String,java.lang.String> |
getExtraDataMap()
Returns a java.util.Map of the extra infos of this results.
|
java.lang.String |
getExtraDBData(java.lang.String name)
Returns the value of the named extra data as an
String ,
or null if no extra info of the given name exists. |
java.util.Map<java.lang.String,java.lang.String> |
getExtraDBDataMap()
Returns a java.util.Map of the extra infos of this results.
|
java.lang.Object |
getExtraInfo(java.lang.String name)
Returns the value of the named extra info as an
Object ,
or null if no extra info of the given name exists. |
java.util.Map<java.lang.String,java.lang.Object> |
getExtraInfoMap()
Returns a java.util.Map of the extra infos of this results.
|
java.util.Map<java.lang.String,FieldStatus> |
getFieldStatusMap(Member mbr)
Returns the FieldStatus map of this data for the given member (currently only works for Publication).
|
java.lang.Object |
getFieldValue(JcmsJspContext ctxt,
java.lang.String fieldName)
Gets the value of the given
Object field name for this Data . |
java.lang.Object |
getFieldValue(java.lang.String fieldName)
Gets the value of the given
Object field name for the current Data . |
java.lang.Object |
getFieldValue(java.lang.String fieldName,
java.lang.String lang)
Gets the value of the given
Object field name for the current Data . |
java.lang.Object |
getFieldValue(java.lang.String fieldName,
java.lang.String lang,
boolean useDefault)
Gets the value of the given
Object field name for the current Data . |
java.lang.String |
getGenericThumbnail()
Returns a generic thumbnail for this Data.
|
java.lang.String |
getImportAuthor()
Get the value of importAuthor.
|
java.lang.String |
getImportBatch()
Get the value of importBatch.
|
java.util.Date |
getImportDate()
Get the value of importDate.
|
java.lang.String |
getImportDisplayUrl()
Get the value of importDisplayUrl.
|
java.lang.String |
getImportId()
Get the value of importId.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getImportMap()
Get the value of importMap.
|
java.util.Date |
getImportMdate()
Get the value of importMdate.
|
static DataSelector |
getImportSelector() |
java.lang.String |
getImportSignature()
Get the value of importSignature.
|
java.lang.String |
getImportSource()
Get the value of importSource.
|
java.lang.String |
getImportSourceUrl()
Get the value of importSourceUrl.
|
java.lang.String |
getImportUrl()
Returns the import URL of this publication, i.e. the XML export URL of the original data.
|
int |
getIntFieldValue(JcmsJspContext ctxt,
java.lang.String fieldName)
Gets the integer value of the specified field name for this
Data . |
int |
getIntFieldValue(java.lang.String fieldName)
Gets the value of the given
int field name for the current Data . |
java.lang.String |
getLangPropertyValue(java.lang.String language)
Retrieve the string value of this object in the specified language,
when being used inside a language property.
|
int |
getLinkCount() |
<T> java.util.TreeSet<T> |
getLinkIndexedDataSet(java.lang.Class<T> clazz)
Returns the Set of clazz instances referring this data
|
<T> java.util.TreeSet<T> |
getLinkIndexedDataSet(java.lang.Class<T> clazz,
java.lang.String field)
A convenient method which returns the Set of clazz instances
referring this data with a given field.
|
java.util.Date |
getLockDate()
Returns the lock date.
|
java.lang.String |
getLockInfo(java.lang.String userLang,
java.util.Locale userLocale,
boolean confirm)
Returns an information message about the lock state.
|
Member |
getLockMember()
Return the member who locked this data
|
long |
getLongFieldValue(JcmsJspContext ctxt,
java.lang.String fieldName)
Gets the long value of the specified field name for this
Data . |
long |
getLongFieldValue(java.lang.String fieldName)
Gets the value of the given
long field name for the current Data . |
static Data.MdateSelector |
getMdateSelector(java.util.Date begin,
java.util.Date end) |
java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDataMap(boolean shortKey)
Returns a
LangProperties representing the Extra
Data description and default values. |
static java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz,
boolean shortKey)
Deprecated.
|
static java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz,
java.lang.String suffix,
boolean shortKey)
Returns a
TreeMap representing the Extra
Data description and default value. |
static java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz,
java.lang.String suffix,
boolean shortKey,
boolean useSuperClasses)
Returns a
TreeMap representing the Extra
Data description and default value. |
java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDBDataMap(boolean shortKey)
Returns a
LangProperties representing the Extra
Data description and default values. |
static java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz,
boolean shortKey)
Deprecated.
|
static java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz,
java.lang.String suffix,
boolean shortKey)
Returns a
TreeMap representing the Extra
Data description and default value. |
static java.util.TreeMap<java.lang.String,java.lang.String> |
getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz,
java.lang.String suffix,
boolean shortKey,
boolean useSuperClasses)
Returns a
TreeMap representing the Extra
Data description and default value. |
Member |
getOpAuthor()
Get the value of opAuthor.
|
static <T extends Data> |
getOpAuthorComparator(java.util.Comparator<Member> memberComparator) |
Member |
getOpDelegate()
Retrieves the Member who is really doing the operation
(through right delegation) as opposed to the opAuthor,
who is the Member having the right to do it.
|
java.lang.Long |
getRowId()
Returns the value of rowId (DBData ID).
|
static <T extends Data> |
getRowIdComparator() |
StrongLock |
getStrongLock()
Returns the StrongLock bound to this Data, if any.
|
java.util.Date |
getStrongLockDate()
Returns the date of the strong lock.
|
java.lang.String |
getStrongLockInfo(java.util.Locale locale)
Returns a string which explains who has the lock (return "" if this Data has no strong lock)
|
Member |
getStrongLockMember()
Returns the member who has strongly locked this Data.
|
static DataSelector |
getStrongLockSelector()
Retrieves a new instance of DataSelector based on the strong lock status of the
data.
|
static TypeEntry |
getTypeEntry()
Returns the TypeEntry bound to
Data . |
static TypeFieldEntry[] |
getTypeFieldsEntries()
Return an array of
TypeFieldEntry bound to Data . |
Data |
getUpdateInstance()
Returns an instance of this object to update it.
|
java.util.Set<java.lang.String> |
getVirtualIDSet()
Returns the set of virtual ID bound to this data (or null if it does not exist).
|
int |
hashCode()
This method return the HashCode of a storable using
the storable id's hashcode if id is not null.
|
void |
importXml(org.jdom.Element elt,
ImportOptions options)
Fill this data with the values contains in the JDOM element.
|
protected void |
importXmlFieldsWithReferences(org.jdom.Element elt,
ImportOptions options) |
void |
importXmlFiles(java.util.Map fieldFileMap,
ImportOptions options) |
void |
importXmlReferences(org.jdom.Element elt,
ImportOptions options)
Resolves imported references for this data.
|
void |
initializeDBDataCollections()
This methods force the collections of the DBData to be initialized()
|
boolean |
isDBData()
Returns true if this objet is an instance of DBData.
|
boolean |
isImported()
Returns true if this data has been imported.
|
boolean |
isImportUpdated()
Get the value of isImportUpdated.
|
boolean |
isInDatabase()
Returns true if this data is stored in the database (false if it is stored in JStore).
|
boolean |
isLocked()
Returns true if this data is locked.
|
boolean |
isPersisted()
Returns true if this data has been persisted (either in JStore or in the database).
|
boolean |
isStrongLocked()
Check if this data is strongly locked.
|
void |
lock(Member mbr)
Locks this data for a given member.
|
void |
markNewImport()
Internal method used to mark an imported data.
|
protected <T extends Data> |
mergeHybridLink(java.lang.Class<T> clazz,
T[] storableArray,
java.lang.String[] dbidArray)
Returns the merge from the given array of storable with the given array of DBID.
|
protected void |
performAfterWrite(int op,
Member mbr,
java.util.Map context)
Called to perform some action after the write.
|
protected void |
performBeforeWrite(int op,
Member mbr,
java.util.Map context)
Called to perform some action before the write.
|
void |
performCreate(Member mbr)
Performs data creation.
|
void |
performCreate(Member mbr,
java.util.Map context)
Performs data creation
|
void |
performDelete(Member mbr)
Performs data deletion.
|
void |
performDelete(Member mbr,
java.util.Map context)
Performs data deletion
|
void |
performUpdate(Member mbr)
Performs data update.
|
void |
performUpdate(Member mbr,
java.util.Map context)
Performs data update
|
void |
prepareUpdateContext(java.util.Map context) |
void |
printDataName(java.lang.StringBuilder sb,
java.util.Locale locale,
java.lang.String accessibilityInfo)
Print the data name in the specified StringBuilder.
|
void |
printDisplayLinkEnd(java.lang.StringBuilder sb)
Print closing tag </a>.
|
void |
printDisplayLinkStart(java.lang.StringBuilder sb,
java.util.Locale locale,
java.lang.String baseURL,
java.lang.String params,
java.lang.String anchor,
java.lang.String title,
java.lang.String accessibilityInfo,
java.lang.String css,
java.lang.String htmlAttributes,
javax.servlet.http.HttpServletRequest request,
boolean update,
java.lang.String[] paramNames,
java.lang.String[] paramValues,
java.lang.String[] paramRemove)
Print opening tag <a... href attribute with URL and other attributes.
|
void |
printDisplayUrl(java.lang.StringBuilder sb,
java.util.Locale locale,
java.lang.String baseURL,
java.lang.String params,
java.lang.String anchor)
Prints URL using parameter of this tag.
|
void |
printDisplayUrl(java.lang.StringBuilder sb,
java.util.Locale locale,
java.lang.String baseURL,
java.lang.String params,
java.lang.String anchor,
javax.servlet.http.HttpServletRequest request,
boolean update,
java.lang.String[] paramNames,
java.lang.String[] paramValues,
java.lang.String[] paramRemove)
Prints URL using parameter of this tag.
|
void |
putStrongLock(Member mbr)
Put (and save) a strong lock on this Data.
|
void |
releaseStrongLock()
Releases the strong lock, without checking the member.
|
void |
releaseStrongLock(Member mbr)
Release the lock on this Data
|
java.lang.String |
removeExtraData(java.lang.String name)
Removes an extra data from this
Data . |
java.lang.String |
removeExtraDBData(java.lang.String name)
Removes an extra data from this
Data . |
java.lang.Object |
removeExtraInfo(java.lang.String name)
Removes an extra information from this
Data . |
void |
setAuthor(Member v)
Sets the author of this Data
|
void |
setAuthorDBID(java.lang.String v)
Sets the authorDBID of this Data.
|
void |
setAuthorId(java.lang.String authordId)
Sets the JStore ID of the author (only for DBData).
|
void |
setBooleanFieldValue(java.lang.String fieldName,
boolean value)
Sets the value of the given
boolean field name for the current Data . |
void |
setCategoryFieldValue(java.lang.String fieldName,
java.util.TreeSet value)
Sets the value of the given
Category field name for the current Data . |
void |
setDoubleFieldValue(java.lang.String fieldName,
double value)
Sets the value of the given
double field name for the current Data . |
void |
setExtension(DataExtension v)
Set the value of extension.
|
java.lang.String |
setExtraData(java.lang.String name,
java.lang.String value)
Stores an extra data in this
Data . |
void |
setExtraDataMap(java.util.HashMap<java.lang.String,java.lang.String> extraDataMap)
Override the current extraDataMap with the given one
|
java.lang.String |
setExtraDBData(java.lang.String name,
java.lang.String value)
Stores an extra data in this
Data . |
void |
setExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap)
Override the current extraDBDataMap with the given one
|
void |
setExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap,
boolean inMemoryOnly)
Override the current extraDBDataMap with the given one
|
java.lang.Object |
setExtraInfo(java.lang.String name,
java.lang.Object obj)
Stores an extra information in this
Data . |
void |
setFieldValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of the given
Object field name for the current Data . |
void |
setFieldValue(java.lang.String fieldName,
java.lang.Object value,
java.lang.String lang)
Sets the value of the given
Object field name for the current Data . |
void |
setId(java.lang.String id)
Set the value of id.
|
void |
setImportAuthor(java.lang.String v)
Set the value of importAuthor.
|
void |
setImportBatch(java.lang.String v)
Set the value of importBatch.
|
void |
setImportDate(java.util.Date v)
Set the value of importDate.
|
void |
setImportDisplayUrl(java.lang.String v)
Set the value of importAuthor.
|
void |
setImportId(java.lang.String v)
Set the value of importId.
|
void |
setImportMap(java.util.HashMap<java.lang.String,java.lang.Object> v)
Set the value of importMap.
|
void |
setImportMdate(java.util.Date v)
Set the value of importMdate.
|
void |
setImportSignature(java.lang.String v)
Set the value of importSignature.
|
void |
setImportSource(java.lang.String v)
Set the value of importSource.
|
void |
setImportSourceUrl(java.lang.String v)
Set the value of importSourceUrl.
|
void |
setImportUpdated(boolean v)
Set the value of isImportUpdated.
|
void |
setIntFieldValue(java.lang.String fieldName,
int value)
Sets the value of the given
int field name for the current Data . |
void |
setLongFieldValue(java.lang.String fieldName,
long value)
Sets the value of the given
long field name for the current Data . |
void |
setMdate(java.util.Date v)
Set the value of mdate
|
void |
setOpAuthor(Member v)
Set the value of opAuthor.
|
void |
setOpDelegate(Member mbr)
Defines the Member who is really doing the operation
(through right delegation) as opposed to the opAuthor,
who is the Member having the right to do it.
|
void |
setRowId(java.lang.Long rowId)
Sets the value of rowId (DBData ID).
|
java.lang.String |
toCSV(java.lang.String lang)
Returns a CSV view of this object
|
java.lang.String |
toFullString() |
java.lang.String |
toString() |
void |
unlock()
Unlocks this data.
|
void |
unlock(Member mbr)
Unlocks this data if lock has been put by the given member.
|
void |
unmarkNewImport()
Internal method used to unmark an imported data.
|
void |
updateExtraDataMap(java.lang.String[] keys,
java.lang.String[] values)
Update editable ExtraDBData of this data with the updated/new specified key/value .
|
void |
updateExtraDBDataMap(java.lang.String[] keys,
java.lang.String[] values)
Update editable ExtraDBData of this data with the updated/new specified key/value .
|
protected void |
updateIndexTreeSet(java.lang.String indexName,
java.lang.Object obj,
boolean add)
Update the given index.
|
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setAttributes, setCdate, setDdate, setStore, toXml
public static final java.lang.String REVISION
protected static final Channel channel
public static final java.lang.String DISPLAY_URL_EXTRA_INFO
Use your custom display URL String as the value (need to be done only once).
Example :
data.setExtraInfo(Data.DISPLAY_URL_EXTRA_INFO, "customDisplay.jsp?id=" + data.getId());Later, any invokation of
data.getDisplayUrl()
returns "customDisplay.jsp?id=..."
.protected Member author
protected java.lang.String authorDBID
protected Member opAuthor
protected Member opDelegate
protected DataExtension extension
protected java.util.HashMap<java.lang.String,java.lang.Object> importMap
protected java.util.HashMap<java.lang.String,java.lang.String> extraDataMap
protected transient java.util.Map<java.lang.String,java.lang.String> extraDBDataMapToSaveOnOp
public Data()
public Data(Member author, DataExtension extension)
public Data(Data other)
public java.lang.String getDataName(java.lang.String language)
language
- the language in which to return the name if multilang available for the data.public java.lang.String getLangPropertyValue(java.lang.String language)
This method is the implementation of LangPropertyArgument.getLangPropertyValue(String)
for automatic translation of Object in language properties.
You should not invoke this method directly, use getDataName(String)
instead.
getLangPropertyValue
in interface LangPropertyArgument
language
- the ISO-639 language code to be used to retrieve the localized Object's namepublic java.lang.String getDataImage()
This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
Default behaviour is to return empty string.
public java.lang.String getDataImage(java.lang.String lang, boolean useDefault)
This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
Default behaviour is to return empty string.
lang
- the user language (ISO-639 language code)useDefault
- should the default language be used if no value is found for the specified languagepublic java.lang.String getDataImage(java.lang.String lang)
lang
- the user language (ISO-639 language code)public java.lang.String getGenericThumbnail()
types.{short-class-name}.thumb
.
If no property was defined for the class of this Data, the thumbnail specified in property types.unknown.thumb
is used.
FileDocument uses its own implementation, see FileDocument.getGenericThumbnail()
.
images/jalios/icons/data/article.gif
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toFullString()
public java.lang.String toCSV(java.lang.String lang)
lang
- the output languagepublic static java.lang.String getCSVHeader(java.lang.String lang)
lang
- the output languageprotected void updateIndexTreeSet(java.lang.String indexName, java.lang.Object obj, boolean add)
StoreListener.handleCommitUpdate(com.jalios.jstore.Storable, com.jalios.jstore.Storable, boolean)
,
the oldStorable can be given as a parameter of this method to remove it from the index,
Indeed removing old object from TreeSet or HashSet index works because both object
are the same when compared using BasicStorable.compareTo(BasicStorable)
or BasicStorable.hashCode()
methods.indexName
- the name of the indexobj
- the object to be added or removedadd
- add if true, remove if falsepublic <T> java.util.TreeSet<T> getLinkIndexedDataSet(java.lang.Class<T> clazz)
T
- class of wanted objectsclazz
- the class to search the referring instancespublic <T> java.util.TreeSet<T> getLinkIndexedDataSet(java.lang.Class<T> clazz, java.lang.String field)
T
- class of wanted objectsclazz
- the class to search the referring instancesfield
- the name of the field which contains the referencepublic int getLinkCount()
public java.util.TreeSet getAllReferrerSet(java.lang.Class referrerClass)
referrerClass
- the class to search the referring instancespublic java.util.TreeSet getAllReferrerSet()
public void fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
sb
- the StringBufferpublic java.lang.String getExportXmlDataValue()
public void importXml(org.jdom.Element elt, ImportOptions options)
elt
- the JDOM elementoptions
- the ImportOptionspublic void importXmlReferences(org.jdom.Element elt, ImportOptions options)
elt
- the JDOM elementoptions
- the ImportOptionsprotected void importXmlFieldsWithReferences(org.jdom.Element elt, ImportOptions options)
public void importXmlFiles(java.util.Map fieldFileMap, ImportOptions options)
public java.lang.String exportXml()
public java.lang.String exportXml(java.lang.String[] relateds)
relateds
- possible relateds to be added to the exportpublic java.lang.StringBuffer exportXml(java.lang.StringBuffer sb, java.lang.String[] relateds)
sb
- the StringBufferrelateds
- possible relateds to be added to the exportpublic java.lang.StringBuffer exportXml(java.lang.StringBuffer sb, java.lang.String[] relateds, int indentLevel)
sb
- the StringBuffer.relateds
- possible relateds to be added to the exportindentLevel
- indentation level to be used.public void exportXmlField(java.lang.StringBuffer sb, int indentLevel)
sb
- the StringBufferindentLevel
- the indent levelpublic void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String[] relateds, int indentLevel)
sb
- the StringBufferrelateds
- possible relateds to be added to the exportindentLevel
- the indent levelprotected void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)
public boolean isImported()
public void setMdate(java.util.Date v)
setMdate
in interface Storable
setMdate
in class BasicStorable
v
- Value to assign to mdate.public void markNewImport()
public void unmarkNewImport()
public java.util.HashMap<java.lang.String,java.lang.Object> getImportMap()
public void setImportMap(java.util.HashMap<java.lang.String,java.lang.Object> v)
v
- Value to assign to importMap.public java.lang.String getImportId()
public void setImportId(java.lang.String v)
v
- Value to assign to importId.public java.util.Date getImportDate()
public void setImportDate(java.util.Date v)
v
- Value to assign to importDate.public java.util.Date getImportMdate()
public void setImportMdate(java.util.Date v)
v
- Value to assign to importMdate.public java.lang.String getImportBatch()
public void setImportBatch(java.lang.String v)
v
- Value to assign to importBatch.public boolean isImportUpdated()
public void setImportUpdated(boolean v)
v
- Value to assign to isImportUpdated.public java.lang.String getImportSignature()
public void setImportSignature(java.lang.String v)
v
- Value to assign to importSignature.public java.lang.String getImportSource()
public void setImportSource(java.lang.String v)
v
- Value to assign to importSource.public java.lang.String getImportSourceUrl()
public void setImportSourceUrl(java.lang.String v)
v
- Value to assign to importSourceUrl.public java.lang.String getImportAuthor()
public void setImportAuthor(java.lang.String v)
v
- Value to assign to importAuthor.public java.lang.String getImportDisplayUrl()
public void setImportDisplayUrl(java.lang.String v)
v
- Value to assign to importAuthor.public java.lang.String getImportUrl()
public Member getAuthor()
getAuthor(boolean)
public Member getAuthor(boolean queryDB)
queryDB
- indicates if the database must be re.public void setAuthor(Member v)
v
- the authorpublic java.lang.String getAuthorDBID()
public void setAuthorDBID(java.lang.String v)
v
- the authorDBIDpublic Member getOpAuthor()
public void setOpAuthor(Member v)
v
- Value to assign to opAuthor.public Member getOpDelegate()
public void setOpDelegate(Member mbr)
mbr
- Value to assign to opDelegate.public DataExtension getExtension()
public void setExtension(DataExtension v)
v
- Value to assign to extension.public java.util.Date getDate(java.lang.String dateType)
dateType
- the date typepublic java.util.Date getDate(java.lang.String dateType, java.util.Date defaultDate)
dateType
- the date typedefaultDate
- the default datepublic static Data.CdateSelector getCdateSelector(java.util.Date begin, java.util.Date end)
public static Data.MdateSelector getMdateSelector(java.util.Date begin, java.util.Date end)
public static DataSelector getDateSelector(java.lang.String str, java.util.Date begin, java.util.Date end)
DataSelector
given a name representing
it. The returned selector can be passed to the method JcmsUtil.applyDataSelector(java.util.Collection, DataSelector)
to
allow precise control over the selection of Data
in a Collection
. null
, "date", "cdate": getCdateSelector(Date begin, Date end)
getMdateSelector(Date begin, Date end)
str
- a string representing the selectorbegin
- the begin Date
to use for selectionend
- the end Date
to use for selectionComparator
.public static DataSelector getImportSelector()
public static DataSelector getDeletableSelector(Member opAuthor)
public static DataSelector getAuthorSelector(Member author)
public static <T extends Data> java.util.Comparator<T> getCaddyComparator()
T
- subclass of DataCaddyComparator
.public static <T extends Data> java.util.Comparator<T> getAuthorComparator(java.util.Comparator<Member> memberComparator)
T
- subclass of DatamemberComparator
- a member comparatorData.AuthorComparator
built with the given
member comparator, usually a Member.getNameComparator()
.public static <T extends Data> java.util.Comparator<T> getOpAuthorComparator(java.util.Comparator<Member> memberComparator)
T
- subclass of DatamemberComparator
- a Member comparatorData.OpAuthorComparator
built with the given
member comparator, usually a Member.getNameComparator()
.public static <T extends Data> java.util.Comparator<T> getDataNameComparator(java.lang.String language)
T
- subclass of Datalanguage
- the language that will be used by the DataNameComparatorpublic static <T extends Data> java.util.Comparator<T> getRowIdComparator()
T
- subclass of Datapublic static <T extends Data> java.util.Comparator<T> getComparator(java.lang.String str, boolean reverse)
ComparatorManager
Comparator
given a name representing
it. The returned comparator can be used to sort any Collection
containing Data
s. null
, "date", "cdate": BasicStorable.getCdateComparator()
BasicStorable.getMdateComparator()
getAuthorComparator(Comparator)
with a Member.getNameComparator()
getOpAuthorComparator(Comparator)
with a Member.getNameComparator()
BasicStorable.getIdComparator()
getCaddyComparator()
, since jcms-5.7.T
- specialization of Datastr
- a string representing the comparatorreverse
- a boolean indicating whether the comparator should have
its behavior reversed (true) or unchanged (false)Comparator
.public static DataSelector getStrongLockSelector()
Data.StrongLockSelector
public java.lang.Object setExtraInfo(java.lang.String name, java.lang.Object obj)
Data
. removeExtraInfo(java.lang.String)
.name
- a String
specifying the name of the extra infoobj
- the Object
to be storedpublic java.lang.Object removeExtraInfo(java.lang.String name)
Data
.name
- a String
specifying the name of the extra infopublic java.lang.Object getExtraInfo(java.lang.String name)
Object
,
or null
if no extra info of the given name exists.name
- the name of the extrainfo to retrievepublic java.util.Map<java.lang.String,java.lang.Object> getExtraInfoMap()
public java.util.HashMap<java.lang.String,java.lang.String> getExtraDataMap()
java.lang.IllegalStateException
- if this method is invoked on instance of DBDatapublic void setExtraDataMap(java.util.HashMap<java.lang.String,java.lang.String> extraDataMap)
extraDataMap
- the new extraDataMapjava.lang.IllegalStateException
- if this method is invoked on instance of DBDatapublic java.lang.String getExtraData(java.lang.String name)
String
,
or null
if no extra info of the given name exists.name
- a String
specifying the name of the extra data to retrievejava.lang.IllegalStateException
- if this method is invoked on instance of DBDatapublic java.lang.String setExtraData(java.lang.String name, java.lang.String value)
Data
. removeExtraData(java.lang.String)
.name
- a String
specifying the name of the extra datavalue
- the String
to be storedjava.lang.IllegalStateException
- if this method is invoked on instance of DBDatapublic java.lang.String removeExtraData(java.lang.String name)
Data
.name
- a String
specifying the name of the extra datajava.lang.IllegalStateException
- if this method is invoked on instance of DBData@Deprecated public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz, boolean shortKey)
getNewDefaultExtraDataMap(Class,String,boolean)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sortedclazz
- the class to work withshortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz, java.lang.String suffix, boolean shortKey)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sortedclazz
- the class to work withsuffix
- a suffix to the propertiesshortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz, java.lang.String suffix, boolean shortKey, boolean useSuperClasses)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sortedclazz
- the class to work withsuffix
- a suffix to the propertiesshortKey
- return a Map using shot propertiesuseSuperClasses
- true to retrieve default extradata for super classes of the specified classpublic java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(boolean shortKey)
LangProperties
representing the Extra
Data description and default values.shortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)java.lang.IllegalStateException
- if this method is invoked on instance of DBDatapublic void updateExtraDataMap(java.lang.String[] keys, java.lang.String[] values)
.
This method will NOT allow add/modification of non-editable extradbdata, ie : extradata which are not explicitely declared in properties.
This method is meant to be invoked on a working data (new object before its creation or updateinstance before its update).
It is used Edit Handlers of all Data.
Implementation detail : this method creates a new Map to simplify update of a cloned JStore object (fix issue when extraDataMap has not been cloned prior update)
keys
- String[] representing authorized propertiesvalues
- String[] representing new values of propertiesjava.lang.IllegalStateException
- if this method is invoked on instance of DBDatapublic java.util.Map<java.lang.String,java.lang.String> getExtraDBDataMap()
public void setExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap)
extraDBDataMap
- the new extraDBDataMappublic void setExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap, boolean inMemoryOnly)
extraDBDataMap
- the new extraDBDataMapinMemoryOnly
- if specified to true, the map will be kept in memory (as a ariable of this Data)
variable and will only be saved if invoking performupdate laterpublic java.lang.String getExtraDBData(java.lang.String name)
String
,
or null
if no extra info of the given name exists.name
- a String
specifying the name of the extra data to retrievepublic java.lang.String setExtraDBData(java.lang.String name, java.lang.String value)
Data
. removeExtraDBData(String)
.name
- a String
specifying the name of the extra datavalue
- the String
to be storedpublic java.lang.String removeExtraDBData(java.lang.String name)
Data
.name
- a String
specifying the name of the extra data@Deprecated public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz, boolean shortKey)
getNewDefaultExtraDBDataMap(Class,String,boolean)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sortedclazz
- the class to work withshortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz, java.lang.String suffix, boolean shortKey)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sortedclazz
- the class to work withsuffix
- a suffix to the propertiesshortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz, java.lang.String suffix, boolean shortKey, boolean useSuperClasses)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sortedclazz
- the class to work withsuffix
- a suffix to the propertiesshortKey
- return a Map using shot propertiesuseSuperClasses
- true to retrieve default extradata for super classes of the specified classpublic java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(boolean shortKey)
LangProperties
representing the Extra
Data description and default values.shortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)public void updateExtraDBDataMap(java.lang.String[] keys, java.lang.String[] values)
.
This method will NOT allow add/modification of non-editable extradbdata, ie : extradata which are not explicitely declared in properties.
This method is meant to be invoked on a working data (new object before its creation or updateinstance before its update).
It is used Edit Handlers of all Data.
keys
- String[] representing authorized propertiesvalues
- String[] representing new values of propertiespublic void lock(Member mbr)
mbr
- the member who locks this datapublic void unlock(Member mbr)
mbr
- the member who locked this datapublic void unlock()
public Member getLockMember()
public java.util.Date getLockDate()
public boolean isLocked()
public boolean checkLockMember(Member mbr)
mbr
- the memberpublic Member getStrongLockMember()
public java.util.Date getStrongLockDate()
public void putStrongLock(Member mbr)
mbr
- the member who puts the strong lock.public void releaseStrongLock(Member mbr)
mbr
- the member who releases the lock
(only the member who has locked and the admin
can release the lock).public void releaseStrongLock()
public java.lang.String getStrongLockInfo(java.util.Locale locale)
locale
- the localepublic boolean canRequestUnlock(Member mbr)
mbr
- the member who request the lockpublic StrongLock getStrongLock()
StrongLockManager.getStrongLock(Data)
public boolean isStrongLocked()
StrongLockManager.isLocked(Data)
public boolean checkStrongLockMember(Member mbr)
mbr
- the member to checkStrongLockManager.checkLockMember(Data, Member)
public java.lang.String getLockInfo(java.lang.String userLang, java.util.Locale userLocale, boolean confirm)
userLang
- the user languageuserLocale
- the user localeconfirm
- true for a confirm messagepublic Data getUpdateInstance()
public ControllerStatus checkIntegrity()
public ControllerStatus checkIntegrity(java.util.Map context)
context
- a map which contains context parameters (may be null)public java.util.Map<java.lang.String,FieldStatus> getFieldStatusMap(Member mbr)
mbr
- the memberpublic ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcheckIntegrity
- if true, requires the constraints integrity to be checkedcontext
- a map which contains context parameters (may be null)public ControllerStatus checkMember(int op, Member mbr, java.util.Map context)
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public ControllerStatus checkCreate(Member mbr)
mbr
- the member which requests the write operationpublic ControllerStatus checkCreate(Member mbr, java.util.Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public ControllerStatus checkUpdate(Member mbr)
mbr
- the member which requests the write operationpublic ControllerStatus checkUpdate(Member mbr, java.util.Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public ControllerStatus checkDelete(Member mbr)
mbr
- the member which requests the write operationpublic ControllerStatus checkDelete(Member mbr, java.util.Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public java.util.Set<java.lang.String> getVirtualIDSet()
public final void performCreate(Member mbr)
mbr
- the member which requests the write operationpublic void performCreate(Member mbr, java.util.Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public final void performUpdate(Member mbr)
mbr
- the member which requests the write operationpublic void performUpdate(Member mbr, java.util.Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public void prepareUpdateContext(java.util.Map context)
public final void performDelete(Member mbr)
mbr
- the member which requests the write operationpublic void performDelete(Member mbr, java.util.Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)protected void performBeforeWrite(int op, Member mbr, java.util.Map context)
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)protected void performAfterWrite(int op, Member mbr, java.util.Map context)
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public static TypeEntry getTypeEntry()
Data
. Data
will propably return null
as no TypeEntry is available for Data
, this method
is available mainly to be overriden by subclasses. Data
.Channel.getTypeEntry(Class)
public static TypeFieldEntry[] getTypeFieldsEntries()
TypeFieldEntry
bound to Data
. Data
. Data
will propably return an empty
array as no TypeFieldEntry is available for Data
, this method
is available mainly to be overriden by subclasses. TypeFieldEntry
containing all Field used by Data
or an empty array (never return null)Channel.getTypeFieldEntries(Class)
public static TypeFieldEntry[] getAllTypeFieldEntry()
TypeFieldEntry
bound to Data
. Data
. Data
will propably return an empty
array as no TypeFieldEntry is available for Data
, this method
is available mainly to be overriden by subclasses. TypeFieldEntry
containing all Field used by Data
or an empty array (never return null)Channel.getAllTypeFieldEntries(Class)
public int getIntFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldException
int
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.int
field valuejava.lang.NoSuchFieldException
- if the field was not found.public void setIntFieldValue(java.lang.String fieldName, int value) throws java.lang.NoSuchFieldException
int
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.value
- the int
field valuejava.lang.NoSuchFieldException
- if the field was not found.public long getLongFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldException
long
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.long
field valuejava.lang.NoSuchFieldException
- if the field was not found.public void setLongFieldValue(java.lang.String fieldName, long value) throws java.lang.NoSuchFieldException
long
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.value
- the long
field valuejava.lang.NoSuchFieldException
- if the field was not found.public double getDoubleFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldException
double
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.double
field valuejava.lang.NoSuchFieldException
- if the field was not found.public void setDoubleFieldValue(java.lang.String fieldName, double value) throws java.lang.NoSuchFieldException
double
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.value
- the double
field valuejava.lang.NoSuchFieldException
- if the field was not found.public boolean getBooleanFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldException
boolean
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.boolean
field valuejava.lang.NoSuchFieldException
- if the field was not found.public void setBooleanFieldValue(java.lang.String fieldName, boolean value) throws java.lang.NoSuchFieldException
boolean
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.value
- the boolean
field valuejava.lang.NoSuchFieldException
- if the field was not found.public java.util.TreeSet getCategoryFieldValue(java.lang.String fieldName, Member mbr) throws java.lang.NoSuchFieldException
Category
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.mbr
- the member used to check rigth access to categories.TreeSet
of Category
java.lang.NoSuchFieldException
- if the field was not found in the given Data
.public void setCategoryFieldValue(java.lang.String fieldName, java.util.TreeSet value) throws java.lang.NoSuchFieldException
Category
field name for the current Data
.fieldName
- the field name from which to retrieve the field value.value
- TreeSet
of Category
java.lang.NoSuchFieldException
- if the field was not found in the given Data
.public java.lang.Object getFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldException
Object
field name for the current Data
. Category
fields, see #getCategoryFieldValue(Member).fieldName
- the field name from which to retrieve the field value.Object
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.getFieldValue(String, String, boolean)
public void setFieldValue(java.lang.String fieldName, java.lang.Object value) throws java.lang.NoSuchFieldException
Object
field name for the current Data
. Category
fields, see #setCategoryFieldValue(String, TreeSet).fieldName
- the field name from which to retrieve the field value.value
- the Object
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.setFieldValue(String, Object, String)
public java.lang.Object getFieldValue(java.lang.String fieldName, java.lang.String lang) throws java.lang.NoSuchFieldException
Object
field name for the current Data
. Category
fields, see #getCategoryFieldValue(String, Member).fieldName
- the field name from which to retrieve the field value.lang
- the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).Object
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.getFieldValue(String, String, boolean)
public java.lang.Object getFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault) throws java.lang.NoSuchFieldException
Object
field name for the current Data
. Category
fields, see #getCategoryFieldValue(String, Member).fieldName
- the field name from which to retrieve the field value.lang
- the language (ISO-639 code) in which to retrieve the field value
(used only for multilingual fields).useDefault
- whether to use the publication main language if the field value
is not available in the requested language (used only for multilingual fields).Object
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.public void setFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang) throws java.lang.NoSuchFieldException
Object
field name for the current Data
. Category
fields, see #getCategoryFieldValue(String, Member).fieldName
- the field name from which to retrieve the field value.value
- the Object
field valuelang
- the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).java.lang.NoSuchFieldException
- if the field was not found in the given Data
.public java.lang.Object getFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Object
field name for this Data
. Category
fields and primitive fields values.ctxt
- the current context in which this field's value is request.fieldName
- the field name from which to retrieve the field value.Object
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
public int getIntFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Data
.ctxt
- the current context in which this field's value is request.fieldName
- the field name from which to retrieve the field value.int
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
public long getLongFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Data
.ctxt
- the current context in which this field's value is request.fieldName
- the field name from which to retrieve the field value.long
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getLongFieldValue(JcmsJspContext, String, Data, long)
public double getDoubleFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Data
.ctxt
- the current context in which this field's value is request.fieldName
- the field name from which to retrieve the field value.double
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getDoubleFieldValue(JcmsJspContext, String, Data, double)
public boolean getBooleanFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Data
.ctxt
- the current context in which this field's value is request.fieldName
- the field name from which to retrieve the field value.boolean
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getBooleanFieldValue(JcmsJspContext, String, Data, boolean)
public java.util.TreeSet<Category> getCategoryFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Data
.ctxt
- the current context in which this field's value is request.fieldName
- the field name from which to retrieve the field value.Category
field valuejava.lang.NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getCategoryFieldValue(JcmsJspContext, String, Data, TreeSet)
public java.lang.String getDisplayUrl(java.util.Locale locale)
DescriptiveURLs
)
the url will be generated using DescriptiveURLs.getDescriptiveURL(Data, Locale)
otherwise, a standard "display.jsp?id=" URL is generated. locale
- the Locale
to use for I18N and localized operationsJcmsUtil.getDisplayUrl(Data, Locale)
public java.lang.String getDisplayLink(java.util.Locale locale)
locale
- the current Locale to use for I18N of the URL and other title informationpublic java.lang.String getDisplayLink(java.util.Locale locale, java.lang.String baseURL)
locale
- the current Locale to use for I18N of the URL and other title informationbaseURL
- optionnal baseURL to use in the URL *public java.lang.String getDisplayLink(java.util.Locale locale, java.lang.String baseURL, java.lang.String params, java.lang.String anchor, java.lang.String title, java.lang.String accessibilityInfo, java.lang.String css, java.lang.String htmlAttributes)
locale
- the current Locale to use for I18N of the URL and other title informationbaseURL
- optionnal baseURL to use in the URLparams
- optionnal additionnal params to in the URL (eg foo=bar&zig=42
)anchor
- optionnal anchor to print in the URL (eg #foobar
title
- the value to use in the title attribute (highly recommended, do not encode)css
- optionnal classname to use in the tagaccessibilityInfo
- a string indicating where to print accessibility information of FileDocument :
"title"
to print them in title attribute,
"content"
to print them in the body of the a tag,
anything else will not print additionnal accessibility informationhtmlAttributes
- optionnal additionnal html attributes to use in the tag (must no be href, title and class)public void printDisplayLinkStart(java.lang.StringBuilder sb, java.util.Locale locale, java.lang.String baseURL, java.lang.String params, java.lang.String anchor, java.lang.String title, java.lang.String accessibilityInfo, java.lang.String css, java.lang.String htmlAttributes, javax.servlet.http.HttpServletRequest request, boolean update, java.lang.String[] paramNames, java.lang.String[] paramValues, java.lang.String[] paramRemove)
sb
- the StringBuilder in which start of a tag will be appendedlocale
- the user LocalebaseURL
- optionnal baseURL to use in the URLparams
- optionnal additionnal params to in the URL (eg foo=bar&zig=42
)anchor
- optionnal anchor to print in the URL (eg #foobar
title
- the value to use in the title attribute (highly recommended, do not encode)accessibilityInfo
- a string indicating where to print accessibility information of FileDocument :
"title"
to print them in title attribute,
anything else will not print additionnal accessibility informationcss
- optionnal classname to use in the taghtmlAttributes
- optionnal additionnal html attributes to use in the tag (must no be href, title and class)request
- the HttpRequest. Requested if update or paramNames is provided.update
- specify this parameter to true to generate a display URL for the given data while keeping all the current others parameters.paramNames
- Optionnal request parameters names to be updated from the current request parameters. You must specify the 'values' attributes with an array of the same dimension. Trigger the same url generation behavior as when specifying the 'update' attribute to true.paramValues
- Request parameters values to be updated from the current request parameters. This array must match the correponding names array specified in the 'names' attribute. Trigger the same url generation behavior as when specifying the 'update' attribute to true.paramRemove
- Request parameters names to be removed from the current request parameters. Trigger the same url generation behavior as when specifying the 'update' attribute to true.public void printDataName(java.lang.StringBuilder sb, java.util.Locale locale, java.lang.String accessibilityInfo)
sb
- the StringBuilderlocale
- the user LocaleaccessibilityInfo
- if "content" print accessibility info for FileDocumentpublic void printDisplayLinkEnd(java.lang.StringBuilder sb)
sb
- the StringBuilderpublic void printDisplayUrl(java.lang.StringBuilder sb, java.util.Locale locale, java.lang.String baseURL, java.lang.String params, java.lang.String anchor)
sb
- the StringBuilderlocale
- the user LocalebaseURL
- optionnal baseURL to use in the URLparams
- optionnal additionnal params to in the URL (eg foo=bar&zig=42
)anchor
- optionnal anchor to print in the URL (eg #foobar
public void printDisplayUrl(java.lang.StringBuilder sb, java.util.Locale locale, java.lang.String baseURL, java.lang.String params, java.lang.String anchor, javax.servlet.http.HttpServletRequest request, boolean update, java.lang.String[] paramNames, java.lang.String[] paramValues, java.lang.String[] paramRemove)
sb
- the StringBuilderlocale
- the user LocalebaseURL
- optionnal baseURL to use in the URLparams
- optionnal additionnal params to in the URL (eg foo=bar&zig=42
)anchor
- optionnal anchor to print in the URL (eg #foobar
request
- the HttpRequest. Requested if update or paramNames is provided.update
- specify this parameter to true to generate a display URL for the given data while keeping all the current others parameters.paramNames
- Optionnal request parameters names to be updated from the current request parameters. You must specify the 'values' attributes with an array of the same dimension. Trigger the same url generation behavior as when specifying the 'update' attribute to true.paramValues
- Request parameters values to be updated from the current request parameters. This array must match the correponding names array specified in the 'names' attribute. Trigger the same url generation behavior as when specifying the 'update' attribute to true.paramRemove
- Request parameters names to be removed from the current request parameters. Trigger the same url generation behavior as when specifying the 'update' attribute to true.public java.lang.String getDataIcon()
If this method behavior has not been overriden by subclass, the default icon can be declared
using property types.{Type}.icon
, where {Type}
is the short class name of
the type concerned.
types.Article.icon: images/jalios/icon/abstract.gif
types.Article.icon: ss_sprite ss_date
images/jalios/icon/abstract.gif
) or sprite classes name (eg ss_sprite ss_date
).getDataIconHtml(String)
public java.lang.String getDataIconAlt(java.lang.String lang)
If this method behavior has not been overriden by subclass, the default alternative text can be declared
using language property types.{Type}.alt
, where {Type}
is the short class name of
the type concerned.
For example :
[en.prop]
types.Workspace.alt: Workspace
[fr.prop]
types.Workspace.alt: Espace de travail
lang
- the user languagegetDataIconHtml(String)
public java.lang.String getDataIconTitle(java.lang.String lang)
If this method behavior has not been overriden by subclass, the default alternative text can be declared
using language property types.{Type}.title
, where {Type}
is the short class name of
the type concerned.
lang
- the user language.getDataIconHtml(String)
public java.lang.String getDataIconHtml()
This method uses value return by methods getDataIcon()
,
getDataIconAlt(String)
and getDataIconTitle(String)
to build
an HTML IMG tag.
Channel.getCurrentUserLang()
,
getDataIcon()
,
getDataIconTitle(String)
,
getDataIconAlt(String)
public java.lang.String getDataIconHtml(java.lang.String lang)
This method uses value returned by methods getDataIcon()
,
getDataIconAlt(String)
and getDataIconTitle(String)
to build
an HTML IMG tag.
lang
- the user language.getDataIcon()
,
getDataIconTitle(String)
,
getDataIconAlt(String)
public java.lang.Long getRowId()
public void setRowId(java.lang.Long rowId)
rowId
- the rowIdpublic java.lang.String getAuthorId()
public void setAuthorId(java.lang.String authordId)
If the specified authorId is an invalid ID (non existing Member), the author will be set to the Member specified by property channel.default-author
(or left null if this property has not been set).
authordId
- the JStore author idpublic boolean isDBData()
public boolean isInDatabase()
public boolean isPersisted()
public void setId(java.lang.String id)
BasicStorable
setId
in interface Storable
setId
in class BasicStorable
id
- Value to assign to id.public int hashCode()
BasicStorable
hashCode
in class BasicStorable
public java.lang.Object clone()
clone
in interface Storable
clone
in class BasicStorable
protected <T extends Data> T[] mergeHybridLink(java.lang.Class<T> clazz, T[] storableArray, java.lang.String[] dbidArray)
T
- Any Data typeclazz
- the class of the data contains in the returned array.storableArray
- the array of storable datadbidArray
- the array of DBIDprotected java.lang.String[] computeDBIDArray(Data[] array)
array
- the array to clean.public void initializeDBDataCollections()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.