|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jstore.BasicStorable com.jalios.jcms.Data
public abstract class Data
This abstract class is the super class of all the persistent classes of a JCMS Channel.
Nested Class Summary | |
---|---|
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. |
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
DataSelector selecting only Data having a
strong lock (isStrongLocked() ). |
Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable |
---|
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable> |
Field Summary | |
---|---|
protected Member |
author
|
protected String |
authorDBID
|
protected static Channel |
channel
|
static String |
DISPLAY_URL_EXTRA_INFO
Extra info to key to override default display URL String. |
protected DataExtension |
extension
|
protected HashMap<String,String> |
extraDataMap
|
protected Map<String,String> |
extraDBDataMapToSaveOnOp
|
protected HashMap<String,Object> |
importMap
|
protected Member |
opAuthor
|
protected Member |
opDelegate
|
static String |
REVISION
|
Fields inherited from class com.jalios.jstore.BasicStorable |
---|
cdate, ddate, id, mdate, store |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
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 |
Fields inherited from interface com.jalios.jcms.mashup.ImportConstants |
---|
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 |
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants |
---|
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 Summary | |
---|---|
Data()
|
|
Data(Data other)
|
|
Data(Member author,
DataExtension extension)
|
Method Summary | ||
---|---|---|
boolean |
canRequestLock(Member mbr)
Returns true if the given member can request the lock (by mail). |
|
ControllerStatus |
checkCreate(Member mbr)
Checks if the creation can be performed |
|
ControllerStatus |
checkCreate(Member mbr,
Map context)
Checks if the creation can be performed |
|
ControllerStatus |
checkDelete(Member mbr)
Checks if the deletion can be performed |
|
ControllerStatus |
checkDelete(Member mbr,
Map context)
Checks if the deletion can be performed |
|
ControllerStatus |
checkIntegrity()
Checks whether or not data integrity constraints are respected. |
|
ControllerStatus |
checkIntegrity(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,
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,
Map context)
Checks if the update can be performed |
|
ControllerStatus |
checkWrite(int op,
Member mbr,
boolean checkIntegrity,
Map context)
Checks if the given write operation can be performed |
|
Object |
clone()
|
|
protected String[] |
computeDBIDArray(Data[] array)
Extract the DBData from the given array and return an array of identifier of those DBData. |
|
String |
exportXml()
Returns the XML export this data. |
|
String |
exportXml(String[] relateds)
Returns the XML export this data. |
|
StringBuffer |
exportXml(StringBuffer sb,
String[] relateds)
Fill the given StringBuffer with the XML export this data. |
|
StringBuffer |
exportXml(StringBuffer sb,
String[] relateds,
int indentLevel)
Fill the given StringBuffer with the XML export this data. |
|
void |
exportXmlField(StringBuffer sb,
int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data. |
|
void |
exportXmlRelated(StringBuffer sb,
String[] relateds,
int indentLevel)
Fills the given StringBuffer with Xml export of related of this data. |
|
protected void |
exportXmlRelated(StringBuffer sb,
String related,
int indentLevel)
|
|
void |
fillExportXmlFieldAttributes(StringBuffer sb)
Fill the given string buffer with specific attributes of this data. |
|
TreeSet |
getAllReferrerSet()
Return all the referrers of this data |
|
TreeSet |
getAllReferrerSet(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
|
getAuthorComparator(Comparator<Member> memberComparator)
|
|
String |
getAuthorDBID()
Returns a JCMS ID of the author if it is persisted in the DB. |
|
String |
getAuthorId()
Returns the JStore ID of the author (only for DBData) |
|
static DataSelector |
getAuthorSelector(Member author)
|
|
boolean |
getBooleanFieldValue(JcmsJspContext ctxt,
String fieldName)
Gets the boolean value of the specified field name for this Data . |
|
boolean |
getBooleanFieldValue(String fieldName)
Gets the value of the given boolean field name for the current Data . |
|
static
|
getCaddyComparator()
|
|
TreeSet<Category> |
getCategoryFieldValue(JcmsJspContext ctxt,
String fieldName)
Gets the Category value of the specified field name for this Data . |
|
TreeSet |
getCategoryFieldValue(String fieldName,
Member mbr)
Gets the value of the given Category field name for the current Data . |
|
static Data.CdateSelector |
getCdateSelector(Date begin,
Date end)
|
|
static
|
getComparator(String str,
boolean reverse)
Deprecated. use ComparatorManager |
|
static String |
getCSVHeader(String lang)
Returns the CSV header of this object |
|
String |
getDataImage()
Retrieves the image path of this data in the channel's main language. |
|
String |
getDataImage(String lang)
Retrieves the image path of this data in the specified language. |
|
String |
getDataImage(String lang,
boolean useDefault)
Retrieves the image path of this data. |
|
String |
getDataName(String language)
Return the name of this Data, every sub class Data which will be displayed to user should implements this method already. |
|
static
|
getDataNameComparator(String language)
|
|
Date |
getDate(String dateType)
Return the date corresponding to the given parameter : date/cdate, mdate or null if nothing match or the matching date is null. |
|
Date |
getDate(String dateType,
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(String str,
Date begin,
Date end)
Retrieves a new DataSelector given a name representing
it. |
|
static DataSelector |
getDeletableSelector(Member opAuthor)
|
|
String |
getDisplayLink(Locale locale)
Retrieve an HTML a tag suitable to display this Data |
|
String |
getDisplayLink(Locale locale,
String baseURL,
String params,
String anchor,
String title,
String accessibilityInfo,
String css,
String htmlAttributes)
Retrieve an HTML a tag suitable to display this Data |
|
String |
getDisplayUrl(Locale locale)
Return the URL to access this data in the front office. |
|
double |
getDoubleFieldValue(JcmsJspContext ctxt,
String fieldName)
Gets the double value of the specified field name for this Data . |
|
double |
getDoubleFieldValue(String fieldName)
Gets the value of the given double field name for the current Data . |
|
String |
getExportXmlDataValue()
Returns a string representation of this data used by exportXml(). |
|
DataExtension |
getExtension()
Get the value of extension. |
|
String |
getExtraData(String name)
Returns the value of the named extra data as an String ,
or null if no extra info of the given name exists. |
|
HashMap<String,String> |
getExtraDataMap()
Returns a java.util.Map of the extra infos of this results. |
|
String |
getExtraDBData(String name)
Returns the value of the named extra data as an String ,
or null if no extra info of the given name exists. |
|
Map<String,String> |
getExtraDBDataMap()
Returns a java.util.Map of the extra infos of this results. |
|
Object |
getExtraInfo(String name)
Returns the value of the named extra info as an Object ,
or null if no extra info of the given name exists. |
|
Map<String,Object> |
getExtraInfoMap()
Returns a java.util.Map of the extra infos of this results. |
|
Map<String,FieldStatus> |
getFieldStatusMap(Member mbr)
Returns the FieldStatus map of this data for the given member (currently only works for Publication). |
|
Object |
getFieldValue(JcmsJspContext ctxt,
String fieldName)
Gets the value of the given Object field name for this Data . |
|
Object |
getFieldValue(String fieldName)
Gets the value of the given Object field name for the current Data . |
|
Object |
getFieldValue(String fieldName,
String lang)
Gets the value of the given Object field name for the current Data . |
|
Object |
getFieldValue(String fieldName,
String lang,
boolean useDefault)
Gets the value of the given Object field name for the current Data . |
|
String |
getGenericThumbnail()
Returns a generic thumbnail for this Data as defined by properties data.thumb.{short-class-name} . |
|
String |
getImportAuthor()
Get the value of importAuthor. |
|
String |
getImportBatch()
Get the value of importBatch. |
|
Date |
getImportDate()
Get the value of importDate. |
|
String |
getImportDisplayUrl()
Get the value of importDisplayUrl. |
|
String |
getImportId()
Get the value of importId. |
|
HashMap<String,Object> |
getImportMap()
Get the value of importMap. |
|
Date |
getImportMdate()
Get the value of importMdate. |
|
static DataSelector |
getImportSelector()
|
|
String |
getImportSignature()
Get the value of importSignature. |
|
String |
getImportSource()
Get the value of importSource. |
|
String |
getImportSourceUrl()
Get the value of importSourceUrl. |
|
String |
getImportUrl()
Returns the import URL of this publication, i.e. |
|
int |
getIntFieldValue(JcmsJspContext ctxt,
String fieldName)
Gets the integer value of the specified field name for this Data . |
|
int |
getIntFieldValue(String fieldName)
Gets the value of the given int field name for the current Data . |
|
String |
getLangPropertyValue(String language)
Retrieve the string value of this object in the specified language, when being used inside a language property. |
|
int |
getLinkCount()
|
|
|
getLinkIndexedDataSet(Class<T> clazz)
Returns the Set of clazz instances referring this data |
|
|
getLinkIndexedDataSet(Class<T> clazz,
String field)
A convenient method which returns the Set of clazz instances referring this data with a given field. |
|
Date |
getLockDate()
Returns the lock date. |
|
String |
getLockInfo(String userLang,
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,
String fieldName)
Gets the long value of the specified field name for this Data . |
|
long |
getLongFieldValue(String fieldName)
Gets the value of the given long field name for the current Data . |
|
static Data.MdateSelector |
getMdateSelector(Date begin,
Date end)
|
|
TreeMap<String,String> |
getNewDefaultExtraDataMap(boolean shortKey)
Returns a LangProperties representing the Extra
Data description and default values. |
|
static TreeMap<String,String> |
getNewDefaultExtraDataMap(Class<? extends Data> clazz,
boolean shortKey)
Deprecated. |
|
static TreeMap<String,String> |
getNewDefaultExtraDataMap(Class<? extends Data> clazz,
String suffix,
boolean shortKey)
Returns a TreeMap representing the Extra
Data description and default value. |
|
static TreeMap<String,String> |
getNewDefaultExtraDataMap(Class<? extends Data> clazz,
String suffix,
boolean shortKey,
boolean useSuperClasses)
Returns a TreeMap representing the Extra
Data description and default value. |
|
TreeMap<String,String> |
getNewDefaultExtraDBDataMap(boolean shortKey)
Returns a LangProperties representing the Extra
Data description and default values. |
|
static TreeMap<String,String> |
getNewDefaultExtraDBDataMap(Class<? extends Data> clazz,
boolean shortKey)
Deprecated. |
|
static TreeMap<String,String> |
getNewDefaultExtraDBDataMap(Class<? extends Data> clazz,
String suffix,
boolean shortKey)
Returns a TreeMap representing the Extra
Data description and default value. |
|
static TreeMap<String,String> |
getNewDefaultExtraDBDataMap(Class<? extends Data> clazz,
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
|
getOpAuthorComparator(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. |
|
Long |
getRowId()
Returns the value of rowId (DBData ID). |
|
static
|
getRowIdComparator()
|
|
StrongLock |
getStrongLock()
Returns the StrongLock bound to this Data, if any. |
|
Date |
getStrongLockDate()
Returns the date of the strong lock. |
|
String |
getStrongLockInfo(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. |
|
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(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
|
mergeHybridLink(Class<T> clazz,
T[] storableArray,
String[] dbidArray)
Returns the merge from the given array of storable with the given array of DBID. |
|
protected void |
performAfterWrite(int op,
Member mbr,
Map context)
Called to perform some action after the write. |
|
protected void |
performBeforeWrite(int op,
Member mbr,
Map context)
Called to perform some action before the write. |
|
void |
performCreate(Member mbr)
Performs data creation. |
|
void |
performCreate(Member mbr,
Map context)
Performs data creation. |
|
void |
performDelete(Member mbr)
Performs data deletion. |
|
void |
performDelete(Member mbr,
Map context)
Performs data deletion. |
|
void |
performUpdate(Member mbr)
Performs data update. |
|
void |
performUpdate(Member mbr,
Map context)
Performs data update. |
|
void |
prepareUpdateContext(Map context)
|
|
void |
printDataName(StringBuilder sb,
Locale locale,
String accessibilityInfo)
Print the data name in the specified StringBuilder. |
|
void |
printDisplayLinkEnd(StringBuilder sb)
Print closing tag </a>. |
|
void |
printDisplayLinkStart(StringBuilder sb,
Locale locale,
String baseURL,
String params,
String anchor,
String title,
String accessibilityInfo,
String css,
String htmlAttributes,
javax.servlet.http.HttpServletRequest request,
boolean update,
String[] paramNames,
String[] paramValues,
String[] paramRemove)
Print opening tag <a... |
|
void |
printDisplayUrl(StringBuilder sb,
Locale locale,
String baseURL,
String params,
String anchor)
Prints URL using parameter of this tag. |
|
void |
printDisplayUrl(StringBuilder sb,
Locale locale,
String baseURL,
String params,
String anchor,
javax.servlet.http.HttpServletRequest request,
boolean update,
String[] paramNames,
String[] paramValues,
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 |
|
String |
removeExtraData(String name)
Removes an extra data from this Data . |
|
String |
removeExtraDBData(String name)
Removes an extra data from this Data . |
|
Object |
removeExtraInfo(String name)
Removes an extra information from this Data . |
|
void |
setAuthor(Member v)
Sets the author of this Data |
|
void |
setAuthorDBID(String v)
Sets the authorDBID of this Data. |
|
void |
setAuthorId(String authordId)
Sets the JStore ID of the author (only for DBData). |
|
void |
setBooleanFieldValue(String fieldName,
boolean value)
Sets the value of the given boolean field name for the current Data . |
|
void |
setCategoryFieldValue(String fieldName,
TreeSet value)
Sets the value of the given Category field name for the current Data . |
|
void |
setDoubleFieldValue(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. |
|
String |
setExtraData(String name,
String value)
Stores an extra data in this Data . |
|
void |
setExtraDataMap(HashMap<String,String> extraDataMap)
Override the current extraDataMap with the given one |
|
String |
setExtraDBData(String name,
String value)
Stores an extra data in this Data . |
|
void |
setExtraDBDataMap(Map<String,String> extraDBDataMap)
Override the current extraDBDataMap with the given one |
|
void |
setExtraDBDataMap(Map<String,String> extraDBDataMap,
boolean inMemoryOnly)
Override the current extraDBDataMap with the given one |
|
Object |
setExtraInfo(String name,
Object obj)
Stores an extra information in this Data . |
|
void |
setFieldValue(String fieldName,
Object value)
Sets the value of the given Object field name for the current Data . |
|
void |
setFieldValue(String fieldName,
Object value,
String lang)
Sets the value of the given Object field name for the current Data . |
|
void |
setImportAuthor(String v)
Set the value of importAuthor. |
|
void |
setImportBatch(String v)
Set the value of importBatch. |
|
void |
setImportDate(Date v)
Set the value of importDate. |
|
void |
setImportDisplayUrl(String v)
Set the value of importAuthor. |
|
void |
setImportId(String v)
Set the value of importId. |
|
void |
setImportMap(HashMap<String,Object> v)
Set the value of importMap. |
|
void |
setImportMdate(Date v)
Set the value of importMdate. |
|
void |
setImportSignature(String v)
Set the value of importSignature. |
|
void |
setImportSource(String v)
Set the value of importSource. |
|
void |
setImportSourceUrl(String v)
Set the value of importSourceUrl. |
|
void |
setImportUpdated(boolean v)
Set the value of isImportUpdated. |
|
void |
setIntFieldValue(String fieldName,
int value)
Sets the value of the given int field name for the current Data . |
|
void |
setLongFieldValue(String fieldName,
long value)
Sets the value of the given long field name for the current Data . |
|
void |
setMdate(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(Long rowId)
Sets the value of rowId (DBData ID). |
|
String |
toCSV(String lang)
Returns a CSV view of this object |
|
String |
toFullString()
|
|
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(String[] keys,
String[] values)
Update editable ExtraDBData of this data with the updated/new specified key/value |
|
void |
updateExtraDBDataMap(String[] keys,
String[] values)
Update editable ExtraDBData of this data with the updated/new specified key/value |
|
protected void |
updateIndexTreeSet(String indexName,
Object obj,
boolean add)
Update the given index. When used inside a StoreListener, in the method 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. |
Methods inherited from class com.jalios.jstore.BasicStorable |
---|
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setCdate, setDdate, setId, setStore, toXml |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected static final Channel channel
public static final 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 String authorDBID
protected Member opAuthor
protected Member opDelegate
protected DataExtension extension
protected HashMap<String,Object> importMap
protected HashMap<String,String> extraDataMap
protected transient Map<String,String> extraDBDataMapToSaveOnOp
Constructor Detail |
---|
public Data()
public Data(Member author, DataExtension extension)
public Data(Data other)
Method Detail |
---|
public String getDataName(String language)
language
- the language in which to return the name if multilang available for the data.
public String getLangPropertyValue(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 name
public 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 String getDataImage(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 language
public String getDataImage(String lang)
lang
- the user language (ISO-639 language code)
public String getGenericThumbnail()
data.thumb.{short-class-name}
.
If no property was defined for the class of this Data, the thumbnail specified in property data.thumb.unknown
is used.
FileDocument uses its own implementation, see FileDocument.getGenericThumbnail()
.
images/jalios/icons/data/article.gif
public String toString()
toString
in class Object
public String toFullString()
public String toCSV(String lang)
lang
- the output language
public static String getCSVHeader(String lang)
lang
- the output language
protected void updateIndexTreeSet(String indexName, 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.
obj
- the object to be added or removedadd
- add if true, remove if falsepublic <T> TreeSet<T> getLinkIndexedDataSet(Class<T> clazz)
T
- class of wanted objectsclazz
- the class to search the referring instances
public <T> TreeSet<T> getLinkIndexedDataSet(Class<T> clazz, String field)
T
- class of wanted objectsclazz
- the class to search the referring instancesfield
- the name of the field which contains the reference
public int getLinkCount()
public TreeSet getAllReferrerSet(Class referrerClass)
referrerClass
- the class to search the referring instances
public TreeSet getAllReferrerSet()
public void fillExportXmlFieldAttributes(StringBuffer sb)
sb
- the StringBufferpublic 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(Map fieldFileMap, ImportOptions options)
public String exportXml()
public String exportXml(String[] relateds)
relateds
- possible relateds to be added to the export
public StringBuffer exportXml(StringBuffer sb, String[] relateds)
sb
- the StringBufferrelateds
- possible relateds to be added to the export
public StringBuffer exportXml(StringBuffer sb, String[] relateds, int indentLevel)
sb
- the StringBuffer.relateds
- possible relateds to be added to the exportindentLevel
- indentation level to be used.
public void exportXmlField(StringBuffer sb, int indentLevel)
sb
- the StringBufferindentLevel
- the indent levelpublic void exportXmlRelated(StringBuffer sb, String[] relateds, int indentLevel)
sb
- the StringBufferrelateds
- possible relateds to be added to the exportindentLevel
- the indent levelprotected void exportXmlRelated(StringBuffer sb, String related, int indentLevel)
public boolean isImported()
public void setMdate(Date v)
setMdate
in interface Storable
setMdate
in class BasicStorable
v
- Value to assign to mdate.public void markNewImport()
public void unmarkNewImport()
public HashMap<String,Object> getImportMap()
public void setImportMap(HashMap<String,Object> v)
v
- Value to assign to importMap.public String getImportId()
public void setImportId(String v)
v
- Value to assign to importId.public Date getImportDate()
public void setImportDate(Date v)
v
- Value to assign to importDate.public Date getImportMdate()
public void setImportMdate(Date v)
v
- Value to assign to importMdate.public String getImportBatch()
public void setImportBatch(String v)
v
- Value to assign to importBatch.public boolean isImportUpdated()
public void setImportUpdated(boolean v)
v
- Value to assign to isImportUpdated.public String getImportSignature()
public void setImportSignature(String v)
v
- Value to assign to importSignature.public String getImportSource()
public void setImportSource(String v)
v
- Value to assign to importSource.public String getImportSourceUrl()
public void setImportSourceUrl(String v)
v
- Value to assign to importSourceUrl.public String getImportAuthor()
public void setImportAuthor(String v)
v
- Value to assign to importAuthor.public String getImportDisplayUrl()
public void setImportDisplayUrl(String v)
v
- Value to assign to importAuthor.public 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 String getAuthorDBID()
public void setAuthorDBID(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 Date getDate(String dateType)
dateType
- the date type
public Date getDate(String dateType, Date defaultDate)
dateType
- the date typedefaultDate
- the default date
public static Data.CdateSelector getCdateSelector(Date begin, Date end)
public static Data.MdateSelector getMdateSelector(Date begin, Date end)
public static DataSelector getDateSelector(String str, Date begin, 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 selection
Comparator
.public static DataSelector getImportSelector()
public static DataSelector getDeletableSelector(Member opAuthor)
public static DataSelector getAuthorSelector(Member author)
public static <T extends Data> Comparator<T> getCaddyComparator()
T
- subclass of Data
CaddyComparator
.public static <T extends Data> Comparator<T> getAuthorComparator(Comparator<Member> memberComparator)
T
- subclass of DatamemberComparator
- a member comparator
Data.AuthorComparator
built with the given
member comparator, usually a Member.getNameComparator()
.public static <T extends Data> Comparator<T> getOpAuthorComparator(Comparator<Member> memberComparator)
T
- subclass of DatamemberComparator
-
Data.OpAuthorComparator
built with the given
member comparator, usually a Member.getNameComparator()
.public static <T extends Data> Comparator<T> getDataNameComparator(String language)
T
- subclass of Datalanguage
- the language that will be used by the DataNameComparator
public static <T extends Data> Comparator<T> getRowIdComparator()
public static <T extends Data> Comparator<T> getComparator(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 Object setExtraInfo(String name, Object obj)
Data
. removeExtraInfo(java.lang.String)
.
name
- a String
specifying the name of the extra infoobj
- the Object
to be stored
public Object removeExtraInfo(String name)
Data
.
name
- a String
specifying the name of the extra info
public Object getExtraInfo(String name)
Object
,
or null
if no extra info of the given name exists.
name
- the name of the extrainfo to retrieve
public Map<String,Object> getExtraInfoMap()
public HashMap<String,String> getExtraDataMap()
IllegalStateException
- if this method is invoked on instance of DBDatapublic void setExtraDataMap(HashMap<String,String> extraDataMap)
extraDataMap
- the new extraDataMap
IllegalStateException
- if this method is invoked on instance of DBDatapublic String getExtraData(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 retrieve
IllegalStateException
- if this method is invoked on instance of DBDatapublic String setExtraData(String name, String value)
Data
. removeExtraData(java.lang.String)
.
name
- a String
specifying the name of the extra datavalue
- the String
to be stored
IllegalStateException
- if this method is invoked on instance of DBDatapublic String removeExtraData(String name)
Data
.
name
- a String
specifying the name of the extra data
IllegalStateException
- if this method is invoked on instance of DBData@Deprecated public static TreeMap<String,String> getNewDefaultExtraDataMap(Class<? extends Data> clazz, boolean shortKey)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sorted
clazz
- the class to work withshortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)
public static TreeMap<String,String> getNewDefaultExtraDataMap(Class<? extends Data> clazz, String suffix, boolean shortKey)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sorted
clazz
- 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 TreeMap<String,String> getNewDefaultExtraDataMap(Class<? extends Data> clazz, 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 sorted
clazz
- 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 class
public TreeMap<String,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)
IllegalStateException
- if this method is invoked on instance of DBDatapublic void updateExtraDataMap(String[] keys, 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 properties
IllegalStateException
- if this method is invoked on instance of DBDatapublic Map<String,String> getExtraDBDataMap()
public void setExtraDBDataMap(Map<String,String> extraDBDataMap)
extraDBDataMap
- the new extraDBDataMappublic void setExtraDBDataMap(Map<String,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 String getExtraDBData(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 retrieve
public String setExtraDBData(String name, String value)
Data
. removeExtraDBData(String)
.
name
- a String
specifying the name of the extra datavalue
- the String
to be stored
public String removeExtraDBData(String name)
Data
.
name
- a String
specifying the name of the extra data
@Deprecated public static TreeMap<String,String> getNewDefaultExtraDBDataMap(Class<? extends Data> clazz, boolean shortKey)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sorted
clazz
- the class to work withshortKey
- if true, returns a Map using short properties (someprop instead of someprop.boolean)
public static TreeMap<String,String> getNewDefaultExtraDBDataMap(Class<? extends Data> clazz, String suffix, boolean shortKey)
TreeMap
representing the Extra
Data description and default value.
Note: this implementation always create a new TreeMap because keys are sorted
clazz
- 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 TreeMap<String,String> getNewDefaultExtraDBDataMap(Class<? extends Data> clazz, 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 sorted
clazz
- 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 class
public TreeMap<String,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(String[] keys, 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 Date getLockDate()
public boolean isLocked()
public boolean checkLockMember(Member mbr)
mbr
- the member
public Member getStrongLockMember()
public 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 String getStrongLockInfo(Locale locale)
locale
- the locale
public boolean canRequestLock(Member mbr)
mbr
- the member who request the lock
public StrongLock getStrongLock()
StrongLockManager.getStrongLock(Data)
public boolean isStrongLocked()
StrongLockManager.isLocked(Data)
public boolean checkStrongLockMember(Member mbr)
mbr
- the member to check
StrongLockManager.checkLockMember(Data, Member)
public String getLockInfo(String userLang, Locale userLocale, boolean confirm)
userLang
- the user languageuserLocale
- the user localeconfirm
- true for a confirm message
public Data getUpdateInstance()
public ControllerStatus checkIntegrity()
public ControllerStatus checkIntegrity(Map context)
context
- a map which contains context parameters (may be null)
public Map<String,FieldStatus> getFieldStatusMap(Member mbr)
mbr
- the member
public ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, 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, 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 operation
public ControllerStatus checkCreate(Member mbr, 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 operation
public ControllerStatus checkUpdate(Member mbr, 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 operation
public ControllerStatus checkDelete(Member mbr, Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
public final void performCreate(Member mbr)
mbr
- the member which requests the write operationpublic void performCreate(Member mbr, 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, Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public void prepareUpdateContext(Map context)
public final void performDelete(Member mbr)
mbr
- the member which requests the write operationpublic void performDelete(Member mbr, 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, 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, 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(String fieldName) throws NoSuchFieldException
int
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.
int
field value
NoSuchFieldException
- if the field was not found.public void setIntFieldValue(String fieldName, int value) throws NoSuchFieldException
int
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.value
- the int
field value
NoSuchFieldException
- if the field was not found.public long getLongFieldValue(String fieldName) throws NoSuchFieldException
long
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.
long
field value
NoSuchFieldException
- if the field was not found.public void setLongFieldValue(String fieldName, long value) throws NoSuchFieldException
long
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.value
- the long
field value
NoSuchFieldException
- if the field was not found.public double getDoubleFieldValue(String fieldName) throws NoSuchFieldException
double
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.
double
field value
NoSuchFieldException
- if the field was not found.public void setDoubleFieldValue(String fieldName, double value) throws NoSuchFieldException
double
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.value
- the double
field value
NoSuchFieldException
- if the field was not found.public boolean getBooleanFieldValue(String fieldName) throws NoSuchFieldException
boolean
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.
boolean
field value
NoSuchFieldException
- if the field was not found.public void setBooleanFieldValue(String fieldName, boolean value) throws NoSuchFieldException
boolean
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.value
- the boolean
field value
NoSuchFieldException
- if the field was not found.public TreeSet getCategoryFieldValue(String fieldName, Member mbr) throws 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
NoSuchFieldException
- if the field was not found in the given Data
.public void setCategoryFieldValue(String fieldName, TreeSet value) throws NoSuchFieldException
Category
field name for the current Data
.
fieldName
- the field name from which to retrieve the field value.value
- TreeSet
of Category
NoSuchFieldException
- if the field was not found in the given Data
.public Object getFieldValue(String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.getFieldValue(String, String, boolean)
public void setFieldValue(String fieldName, Object value) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.setFieldValue(String, Object, String)
public Object getFieldValue(String fieldName, String lang) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.getFieldValue(String, String, boolean)
public Object getFieldValue(String fieldName, String lang, boolean useDefault) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.public void setFieldValue(String fieldName, Object value, String lang) throws 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).
NoSuchFieldException
- if the field was not found in the given Data
.public Object getFieldValue(JcmsJspContext ctxt, String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
public int getIntFieldValue(JcmsJspContext ctxt, String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
public long getLongFieldValue(JcmsJspContext ctxt, String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getLongFieldValue(JcmsJspContext, String, Data, long)
public double getDoubleFieldValue(JcmsJspContext ctxt, String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getDoubleFieldValue(JcmsJspContext, String, Data, double)
public boolean getBooleanFieldValue(JcmsJspContext ctxt, String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getBooleanFieldValue(JcmsJspContext, String, Data, boolean)
public TreeSet<Category> getCategoryFieldValue(JcmsJspContext ctxt, String fieldName) throws 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 value
NoSuchFieldException
- if the field was not found in the given Data
.PortalPolicyFilter.getCategoryFieldValue(JcmsJspContext, String, Data, TreeSet)
public String getDisplayUrl(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 operations
JcmsUtil.getDisplayUrl(Data, Locale)
public String getDisplayLink(Locale locale)
locale
- the current Locale to use for I18N of the URL and other title information
public String getDisplayLink(Locale locale, String baseURL, String params, String anchor, String title, String accessibilityInfo, String css, 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(StringBuilder sb, Locale locale, String baseURL, String params, String anchor, String title, String accessibilityInfo, String css, String htmlAttributes, javax.servlet.http.HttpServletRequest request, boolean update, String[] paramNames, String[] paramValues, 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(StringBuilder sb, Locale locale, String accessibilityInfo)
sb
- the StringBuilderlocale
- the user LocaleaccessibilityInfo
- public void printDisplayLinkEnd(StringBuilder sb)
sb
- the StringBuilderpublic void printDisplayUrl(StringBuilder sb, Locale locale, String baseURL, String params, 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(StringBuilder sb, Locale locale, String baseURL, String params, String anchor, javax.servlet.http.HttpServletRequest request, boolean update, String[] paramNames, String[] paramValues, 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 Long getRowId()
public void setRowId(Long rowId)
rowId
- the rowIdpublic String getAuthorId()
public void setAuthorId(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 int hashCode()
BasicStorable
hashCode
in class BasicStorable
public Object clone()
clone
in interface Storable
clone
in class BasicStorable
protected <T extends Data> T[] mergeHybridLink(Class<T> clazz, T[] storableArray, String[] dbidArray)
clazz
- the class of the data contains in the returned array.storableArray
- the array of storable datadbidArray
- the array of DBID
protected String[] computeDBIDArray(Data[] array)
array
- the array to clean.
public void initializeDBDataCollections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |