Class Data
- java.lang.Object
-
- com.jalios.jstore.BasicStorable
-
- com.jalios.jcms.Data
-
- All Implemented Interfaces:
JcmsConstants,ImportConstants,MashupConstants,Storable,JaliosConstants,LangPropertyArgument,java.lang.Cloneable,java.lang.Comparable<BasicStorable>
- Direct Known Subclasses:
AccessControlList,AccessToken,Alert,AuthenticationCookie,BackgroundProcessInfo,Category,DataExtension,DataRight,FileProcessingInfo,FileProcessingLog,Group,JPortalStructure,LoginEvent,MediaProgression,Member,MemberDeleteRequest,MemberPreference,Notification,NotificationCriteria,Publication,PublicationFollower,PublicDownload,PublicLink,ReaderTracker,Recommendation,StrongLock,Vote,WFNote,WKRole,Workspace,WSTypeEntry
public abstract class Data extends BasicStorable implements JcmsConstants, ImportConstants, LangPropertyArgument
This abstract class is the super class of all the persistent classes of a JCMS Channel.- Author:
- Olivier Dedieu, Olivier Jaquemet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classData.AuthorComparator<T extends Data>static classData.AuthorizedSelectorAuthorizedSelector selects all the Data a member is authorized to read.static classData.AuthorSelectorDataSelectorto selectDatawhose author is the specified one.static classData.CdateSelectorDataSelectorto selectDatawhich have a creation date between the given begin and endDate.static classData.DataNameComparator<T extends Data>This comparator compares two Data using their Data Name.static classData.DeletableSelectorDataSelectorto selectDatathat can be deleted (i.e.static classData.ImportSelectorDataSelectorto selectDatawhich have been imported.static classData.MdateSelectorDataSelectorto selectDatawhich have a modification date between the given begin and endDate.static classData.OpAuthorComparator<T extends Data>static classData.RowIdComparator<T extends Data>static classData.StrongLockSelector-
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
Fields Modifier and Type Field Description protected Memberauthorprotected java.lang.StringauthorDBIDprotected static Channelchannelstatic java.lang.StringDISPLAY_URL_EXTRA_INFOExtra info to key to override default display URL String.protected DataExtensionextensionprotected java.util.HashMap<java.lang.String,java.lang.String>extraDataMapprotected java.util.Map<java.lang.String,java.lang.String>extraDBDataMapToSaveOnOpprotected java.util.HashMap<java.lang.String,java.lang.Object>importMapprotected MemberopAuthorprotected MemberopDelegatestatic java.lang.StringWRITE_IN_PROGRESS_EXTRA_INFOFlag set before beforeWrite and afterWrite, which indicates if the data received in DataControllers or StoreListener is "up-to-date" or maybe has modifications in progress.static java.lang.StringWYSIWYG_INLINE_EDIT_REQUEST_PARAMETER-
Fields inherited from class com.jalios.jstore.BasicStorable
cdate, ddate, id, isStoreCache, mdate, store
-
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.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.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, AJAX_MODE_ATTR, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, CLASS_PROPERTY, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, COUNTRY_SPRITE, CS_TYPOLOGY_ROOT_CAT_VID, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DATA_DIRECTORY, DEFAULT_PHOTO_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, GLYPH_ICON_PREFIX, ICON_ARCHIVE, ICON_ICON_PREFIX, ICON_LOCK, ICON_LOCK_STRONG, ICON_PREFIX_PROP, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, IS_IN_FRONT_OFFICE, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JCMS_TOASTR_COLLECTION, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LANG_SPRITE, 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, ORGANIZATION_ROOT_GROUP_PROP, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_PROP_PREFIX, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_PROP_PREFIX, PHOTO_LARGE_WIDTH, PHOTO_MINI, PHOTO_MINI_HEIGHT, PHOTO_MINI_PROP_PREFIX, PHOTO_MINI_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_PROP_PREFIX, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_PROP_PREFIX, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_PROP_PREFIX, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, RAW_CONTENT_ICON_PREFIX, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SECURITY_LOG_FILE, SESSION_AUTHORIZED_FILENAMES_SET, SPRITE_ICON_PREFIX, STATS_REPORT_DIR, STATUS_PROP, STORE_DIR, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TTCARD_MEDIA_HEIGHT, TTCARD_MEDIA_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, UPLOAD_PERMISSION_COUNT_PROP_PREFIX, UPLOAD_PERMISSION_SIZE_PROP_PREFIX, URL_REGEXP, VID_LOGGED_MEMBER, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanBeReadBy(Member member)Checks if the specified member is authorized to read this Data.booleancanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)Checks if the specified member is authorized to read this Data.booleancanBeUnlockedBy(Member mbr)Returns true if the given member can unlock this data.booleancanRequestUnlock(Member mbr)Returns true if the given member can request to unlock this data.ControllerStatuscheckAndPerformCreate(Member mbr)Checks if the creation can be performed, and performs data creation.ControllerStatuscheckAndPerformCreate(Member mbr, java.util.Map<?,?> context)Checks if the creation can be performed, and performs data creation.ControllerStatuscheckAndPerformDelete(Member mbr)Checks if the deletion can be performed, and performs data deletion.ControllerStatuscheckAndPerformDelete(Member mbr, java.util.Map<?,?> context)Checks if the deletion can be performed, and performs data deletion.ControllerStatuscheckAndPerformUpdate(Member mbr)Checks if the update can be performed, and performs data update.ControllerStatuscheckAndPerformUpdate(Member mbr, java.util.Map<?,?> context)Checks if the update can be performed, and performs data update.ControllerStatuscheckCreate(Member mbr)Checks if the creation can be performedControllerStatuscheckCreate(Member mbr, java.util.Map context)Checks if the creation can be performedControllerStatuscheckDelete(Member mbr)Checks if the deletion can be performedControllerStatuscheckDelete(Member mbr, java.util.Map context)Checks if the deletion can be performedControllerStatuscheckIntegrity()Checks whether or not data integrity constraints are respected.ControllerStatuscheckIntegrity(java.util.Map context)Checks whether or not data integrity constraints are respected.booleancheckLockMember(Member mbr)Returns true if the given member has locked the given data or if the data is not locked.ControllerStatuscheckMember(int op, Member mbr, java.util.Map context)Checks if the given member can perform the given operation.booleancheckStrongLockMember(Member mbr)Check if the specified member has locked this Data or if the Data is not locked.booleancheckStrongLockMember(Member mbr, boolean useCache)Check if the specified member has locked this Data or if the Data is not locked.ControllerStatuscheckUpdate(Member mbr)Checks if the update can be performedControllerStatuscheckUpdate(Member mbr, java.util.Map context)Checks if the update can be performedControllerStatuscheckWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)Checks if the given write operation can be performedprotected voidcleanHybridCollection(Data[] array)protected voidcleanHybridCollection(java.util.List<? extends Data> list)protected voidcleanHybridCollection(java.util.Set<? extends Data> set)protected voidcleanHybridCollections()This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.java.lang.Objectclone()protected java.lang.String[]computeDBIDArray(Data[] dataArray)Extract the DBData from the given array and return an array of identifier of those DBData.protected java.util.ArrayList<java.lang.String>computeDBIDList(java.util.List<? extends Data> dataList)Extract and remove the DBData from the given list and return a list of identifier of those DBData.protected java.util.HashSet<java.lang.String>computeDBIDSet(java.util.Set<? extends Data> dataSet)Extract and remove the DBData from the given set and return a set of identifier of those DBData.java.lang.StringexportXml()Returns the XML export this data.java.lang.StringexportXml(java.lang.String[] relateds)Returns the XML export this data.java.lang.StringBufferexportXml(java.lang.StringBuffer sb, java.lang.String[] relateds)Fill the given StringBuffer with the XML export this data.java.lang.StringBufferexportXml(java.lang.StringBuffer sb, java.lang.String[] relateds, int indentLevel)Fill the given StringBuffer with the XML export this data.voidexportXmlField(java.lang.StringBuffer sb, int indentLevel)Fills the given StringBuffer with Xml export of fields of this data.voidexportXmlRelated(java.lang.StringBuffer sb, java.lang.String[] relateds, int indentLevel)Fills the given StringBuffer with Xml export of related of this data.protected voidexportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)voidfillExportXmlFieldAttributes(java.lang.StringBuffer sb)Fill the given string buffer with specific attributes of this data.java.util.TreeSetgetAllReferrerSet()Returns all the JStore data that references this Data directly or indirectly through a dedicated field.java.util.TreeSetgetAllReferrerSet(java.lang.Class referrerClass)Returns all the JStore data, instance of the specified class, that references this Data directly or indirectly through a dedicated field.static TypeFieldEntry[]getAllTypeFieldEntry()Return an array ofTypeFieldEntrybound toData.MembergetAuthor()Returns the author of this Data.MembergetAuthor(boolean queryDB)Returns the author of this Data.static <T extends Data>
java.util.Comparator<T>getAuthorComparator(java.util.Comparator<Member> memberComparator)java.lang.StringgetAuthorDBID()Returns a JCMS ID of the author if it is persisted in the DB.java.lang.StringgetAuthorId()Returns the JStore ID of the author (only for DBData)static DataSelectorgetAuthorSelector(Member author)booleangetBooleanFieldValue(JcmsJspContext ctxt, java.lang.String fieldName)Gets the boolean value of the specified field name for thisData.booleangetBooleanFieldValue(java.lang.String fieldName)Gets the value of the givenbooleanfield name for the currentData.static <T extends Data>
java.util.Comparator<T>getCaddyComparator()java.util.TreeSet<Category>getCategoryFieldValue(JcmsJspContext ctxt, java.lang.String fieldName)Gets the Category value of the specified field name for thisData.java.util.TreeSet<Category>getCategoryFieldValue(java.lang.String fieldName, Member mbr)Gets the value of the givenCategoryfield name for the currentData.static Data.CdateSelectorgetCdateSelector(java.util.Date begin, java.util.Date end)static <T extends Data>
java.util.Comparator<T>getComparator(java.lang.String str, boolean reverse)Deprecated.static java.lang.StringgetCSVHeader(java.lang.String lang)Returns the CSV header of this objectjava.lang.StringgetDataIcon()Returns source information for the icon associated to this Data, either a relative path or sprite classes name.java.lang.StringgetDataIconAlt(java.lang.String lang)Returns the alternative text (alt attribute) to use in the HTML IMG tag of this Data's icon.java.lang.StringgetDataIconCSS()Returns the CSS for the data icon.java.lang.StringgetDataIconHtml()Returns the HTML code of the icon for this data in the current user language.java.lang.StringgetDataIconHtml(java.lang.String lang)Returns the HTML code of the icon for this data in the specified language.java.lang.StringgetDataIconTitle(java.lang.String lang)Returns the icon's tooltip.java.lang.StringgetDataImage()Retrieves the image path of this data in the channel's main language.java.lang.StringgetDataImage(java.lang.String lang)Retrieves the image path of this data in the specified language.java.lang.StringgetDataImage(java.lang.String lang, boolean useDefault)Retrieves the image path of this data.java.lang.StringgetDataName(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>
java.util.Comparator<T>getDataNameComparator(java.lang.String language)java.util.DategetDate(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.DategetDate(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 DataSelectorgetDateSelector(java.lang.String str, java.util.Date begin, java.util.Date end)Retrieves a newDataSelectorgiven a name representing it.static DataSelectorgetDeletableSelector(Member opAuthor)java.lang.StringgetDisplayLink(java.util.Locale locale)Retrieve an HTML a tag suitable to display this Datajava.lang.StringgetDisplayLink(java.util.Locale locale, java.lang.String baseURL)Retrieve an HTML a tag suitable to display this Datajava.lang.StringgetDisplayLink(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 Datajava.lang.StringgetDisplayLinkCss()DataAttributegetDisplayLinkDataAttribute()java.lang.StringgetDisplayLinkHtmlAttributes()java.lang.StringgetDisplayUrl(java.util.Locale locale)Return the URL to access this data in the front office.doublegetDoubleFieldValue(JcmsJspContext ctxt, java.lang.String fieldName)Gets the double value of the specified field name for thisData.doublegetDoubleFieldValue(java.lang.String fieldName)Gets the value of the givendoublefield name for the currentData.java.lang.StringgetExportXmlDataValue()Returns a string representation of this data used by exportXml().DataExtensiongetExtension()Get the value of extension.java.lang.StringgetExtraData(java.lang.String name)Returns the value of the named extra data as anString, ornullif 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.StringgetExtraDBData(java.lang.String name)Returns the value of the named extra data as anString, ornullif 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.ObjectgetExtraInfo(java.lang.String name)Returns the value of the named extra info as anObject, ornullif 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.ObjectgetFieldValue(JcmsJspContext ctxt, java.lang.String fieldName)Gets the value of the givenObjectfield name for thisData.java.lang.ObjectgetFieldValue(java.lang.String fieldName)Gets the value of the givenObjectfield name for the currentData.java.lang.ObjectgetFieldValue(java.lang.String fieldName, java.lang.String lang)Gets the value of the givenObjectfield name for the currentData.java.lang.ObjectgetFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault)Gets the value of the givenObjectfield name for the currentData.java.lang.StringgetGenericThumbnail()Returns a generic thumbnail for this Data.java.lang.StringgetGenericThumbnail(java.lang.String defaultThumb)Returns a generic thumbnail for this Data.java.lang.StringgetImportAuthor()Get the value of importAuthor.java.lang.StringgetImportBatch()Get the value of importBatch.java.util.DategetImportDate()Get the value of importDate.java.lang.StringgetImportDisplayUrl()Get the value of importDisplayUrl.java.lang.StringgetImportId()Get the value of importId.java.util.HashMap<java.lang.String,java.lang.Object>getImportMap()Get the value of importMap.java.util.DategetImportMdate()Get the value of importMdate.static DataSelectorgetImportSelector()java.lang.StringgetImportSignature()Get the value of importSignature.java.lang.StringgetImportSource()Get the value of importSource.java.lang.StringgetImportSourceUrl()Get the value of importSourceUrl.java.lang.StringgetImportUrl()Returns the import URL of this publication, i.e.intgetIntFieldValue(JcmsJspContext ctxt, java.lang.String fieldName)Gets the integer value of the specified field name for thisData.intgetIntFieldValue(java.lang.String fieldName)Gets the value of the givenintfield name for the currentData.java.lang.StringgetLangPropertyValue(java.lang.String language)Retrieve the string value of this object in the specified language, when being used inside a language property.intgetLinkCount()<T> java.util.TreeSet<T>getLinkIndexedDataSet(java.lang.Class<T> clazz)Returns all the JStore data, instance of the specified class, that references this Data directly through a dedicated field.<T> java.util.TreeSet<T>getLinkIndexedDataSet(java.lang.Class<T> clazz, java.lang.String field)Returns all the JStore data, instance of the specified class, that references this Data directly through a dedicated field of the specified name.java.util.DategetLockDate()Returns the lock date.java.lang.StringgetLockInfo(java.lang.String userLang, java.util.Locale userLocale, boolean confirm)Returns an information message about the lock state.MembergetLockMember()Return the member who locked this datalonggetLongFieldValue(JcmsJspContext ctxt, java.lang.String fieldName)Gets the long value of the specified field name for thisData.longgetLongFieldValue(java.lang.String fieldName)Gets the value of the givenlongfield name for the currentData.static Data.MdateSelectorgetMdateSelector(java.util.Date begin, java.util.Date end)java.util.TreeMap<java.lang.String,java.lang.String>getNewDefaultExtraDataMap(boolean shortKey)Returns aLangPropertiesrepresenting 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 aTreeMaprepresenting 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 aTreeMaprepresenting the Extra Data description and default value.java.util.TreeMap<java.lang.String,java.lang.String>getNewDefaultExtraDBDataMap(boolean shortKey)Returns aLangPropertiesrepresenting 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 aTreeMaprepresenting 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 aTreeMaprepresenting the Extra DB Data description and default value.MembergetOpAuthor()Get the value of opAuthor.static <T extends Data>
java.util.Comparator<T>getOpAuthorComparator(java.util.Comparator<Member> memberComparator)java.lang.StringgetOpAuthorId()Returns the JStore ID of the op author (only for DBData)MembergetOpDelegate()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.static Data.AuthorizedSelectorgetReadAuthorizedSelector(Member member)Retrieve a newData.AuthorizedSelectorinstance for the specified member.java.util.SetgetReferrerSet()Returns the referrer set of this data.java.lang.LonggetRowId()Returns the value of rowId (DBData ID).static <T extends Data>
java.util.Comparator<T>getRowIdComparator()StrongLockgetStrongLock()Returns the StrongLock bound to this Data, if any.java.lang.StringgetStrongLockContext()Return the StrongLock context (if available)java.lang.StringgetStrongLockContextData()Return the StrongLock context data (if available)java.util.DategetStrongLockDate()Returns the date of the strong lock.java.lang.StringgetStrongLockInfo(java.util.Locale locale)Returns a string which explains who has the lock (return "" if this Data has no strong lock)MembergetStrongLockMember()Returns the member who has strongly locked this Data.static DataSelectorgetStrongLockSelector()Retrieves a new instance of DataSelector based on the strong lock status of the data.static TypeEntrygetTypeEntry()Returns the TypeEntry bound toData.static TypeFieldEntry[]getTypeFieldsEntries()Return an array ofTypeFieldEntrybound toData.DatagetUpdateInstance()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).voidimportXml(org.jdom.Element elt, ImportOptions options)Fill this data with the values contains in the JDOM element.protected voidimportXmlFieldsWithReferences(org.jdom.Element elt, ImportOptions options)voidimportXmlFiles(java.util.Map fieldFileMap, ImportOptions options)voidimportXmlReferences(org.jdom.Element elt, ImportOptions options)Resolves imported references for this data.voidinitializeDBDataCollections()This methods force the collections of the DBData to be initialized()booleanisDBData()Returns true if this objet is an instance of DBData.booleanisImported()Returns true if this data has been imported.booleanisImportUpdated()Get the value of isImportUpdated.booleanisInDatabase()Returns true if this data is stored in the database (false if it is stored in JStore).booleanisLocked()Returns true if this data is locked.booleanisPersisted()Returns true if this data has been persisted (either in JStore or in the database).booleanisStrongLocked()Check if this data is strongly locked.voidlock(Member mbr)Locks this data for a given member.voidmarkNewImport()Internal method used to mark an imported data.protected <T extends Data>
java.util.Set<T>mergeHybridLink(java.lang.Class<T> clazz, java.util.Set<? extends Data> storableSet, java.util.Set<java.lang.String> dbidSet)Returns the merge from the given set of storable with the given set of DBID.protected <T extends Data>
T[]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 voidperformAfterWrite(int op, Member mbr, java.util.Map context)Called to perform some action after the write.protected voidperformBeforeWrite(int op, Member mbr, java.util.Map context)Called to perform some action before the write.voidperformCreate(Member mbr)Performs data creation.voidperformCreate(Member mbr, java.util.Map context)Performs data creation.voidperformDelete(Member mbr)Performs data deletion.voidperformDelete(Member mbr, java.util.Map context)Performs data deletion.voidperformUpdate(Member mbr)Performs data update.voidperformUpdate(Member mbr, java.util.Map context)Performs data update.voidprepareUpdateContext(java.util.Map context)voidprintDataName(java.lang.StringBuilder sb, java.util.Locale locale, java.lang.String accessibilityInfo)Print the data name in the specified StringBuilder.voidprintDisplayLinkEnd(java.lang.StringBuilder sb)Print closing tag </a>.voidprintDisplayLinkStart(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, DataAttribute dataAttribute, javax.servlet.http.HttpServletRequest request, boolean update, java.lang.String[] paramNames, java.lang.String[] paramValues, java.lang.String[] paramRemove)Print opening tag <a...voidprintDisplayLinkStart(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...voidprintDisplayUrl(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.voidprintDisplayUrl(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.voidputStrongLock(Member mbr)Put (and save) a strong lock on this Data.voidputStrongLock(Member mbr, java.lang.String context, java.lang.String contextData)Put (and save) a strong lock on this Data.voidreleaseStrongLock()Releases the strong lock, without checking the member.voidreleaseStrongLock(Member mbr)Release the lock on this Datajava.lang.StringremoveExtraData(java.lang.String name)Removes an extra data from thisData.java.lang.StringremoveExtraDBData(java.lang.String name)Removes an extra data from thisData.java.lang.ObjectremoveExtraInfo(java.lang.String name)Removes an extra information from thisData.voidsetAuthor(Member v)Sets the author of this DatavoidsetAuthorDBID(java.lang.String v)Sets the authorDBID of this Data.voidsetAuthorId(java.lang.String authorId)Sets the JStore ID of the author (only for DBData).voidsetBooleanFieldValue(java.lang.String fieldName, boolean value)Sets the value of the givenbooleanfield name for the currentData.voidsetCategoryFieldValue(java.lang.String fieldName, java.util.TreeSet value)Sets the value of the givenCategoryfield name for the currentData.voidsetDoubleFieldValue(java.lang.String fieldName, double value)Sets the value of the givendoublefield name for the currentData.voidsetExtension(DataExtension v)Set the value of extension.java.lang.StringsetExtraData(java.lang.String name, java.lang.String value)Stores an extra data in thisData.voidsetExtraDataMap(java.util.HashMap<java.lang.String,java.lang.String> extraDataMap)Override the current extraDataMap with the given onejava.lang.StringsetExtraDBData(java.lang.String name, java.lang.String value)Stores an extra data in thisData.voidsetExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap)Override the current extraDBDataMap with the given onevoidsetExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap, boolean inMemoryOnly)Override the current extraDBDataMap with the given onejava.lang.ObjectsetExtraInfo(java.lang.String name, java.lang.Object obj)Stores an extra information in thisData.voidsetFieldValue(java.lang.String fieldName, java.lang.Object value)Sets the value of the givenObjectfield name for the currentData.voidsetFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang)Sets the value of the givenObjectfield name for the currentData.voidsetImportAuthor(java.lang.String v)Set the value of importAuthor.voidsetImportBatch(java.lang.String v)Set the value of importBatch.voidsetImportDate(java.util.Date v)Set the value of importDate.voidsetImportDisplayUrl(java.lang.String v)Set the value of importAuthor.voidsetImportId(java.lang.String v)Set the value of importId.voidsetImportMap(java.util.HashMap<java.lang.String,java.lang.Object> v)Set the value of importMap.voidsetImportMdate(java.util.Date v)Set the value of importMdate.voidsetImportSignature(java.lang.String v)Set the value of importSignature.voidsetImportSource(java.lang.String v)Set the value of importSource.voidsetImportSourceUrl(java.lang.String v)Set the value of importSourceUrl.voidsetImportUpdated(boolean v)Set the value of isImportUpdated.voidsetIntFieldValue(java.lang.String fieldName, int value)Sets the value of the givenintfield name for the currentData.voidsetLongFieldValue(java.lang.String fieldName, long value)Sets the value of the givenlongfield name for the currentData.voidsetMdate(java.util.Date v)Set the value of mdatevoidsetOpAuthor(Member v)Set the value of opAuthor.voidsetOpAuthorId(java.lang.String opAuthorId)Sets the JStore ID of the op author (only for DBData).voidsetOpDelegate(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.voidsetRowId(java.lang.Long rowId)Sets the value of rowId (DBData ID).protected voidsplitHybridCollections(Data previousData)This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.java.lang.StringtoCSV(java.lang.String lang)Returns a CSV view of this objectjava.lang.StringtoFullString()java.lang.StringtoString()voidunlock()Unlocks this data.voidunlock(Member mbr)Unlocks this data if lock has been put by the given member.voidunmarkNewImport()Internal method used to unmark an imported data.java.lang.StringBuilderupdateDisplayLinkCss(java.lang.StringBuilder builder)Returns a StringBuilder which contains css, whom you can modify or replace in your subclassesDataAttributeupdateDisplayLinkDataAttribute(DataAttribute dataAttribute)Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclassesjava.lang.StringBuilderupdateDisplayLinkHtmlAttributes(java.lang.StringBuilder builder)Returns a StringBuilder which contains html attributes, whom you can modify or replace in your subclassesvoidupdateExtraDataMap(java.lang.String[] keys, java.lang.String[] values)Update editable ExtraDBData of this data with the updated/new specified key/valuevoidupdateExtraDBDataMap(java.lang.String[] keys, java.lang.String[] values)Update editable ExtraDBData of this data with the updated/new specified key/valueprotected voidupdateIndexTreeSet(java.lang.String indexName, java.lang.Object obj, boolean add)Update the given index.
When used inside a StoreListener, in the methodStoreListener.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 usingBasicStorable.compareTo(BasicStorable)orBasicStorable.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, hashCode, isStored, resetInternalCaches, resolveAtt, resolveVal, setAttributes, setAttributes, setCdate, setDdate, setId, setStore, toXml
-
-
-
-
Field Detail
-
WYSIWYG_INLINE_EDIT_REQUEST_PARAMETER
public static final java.lang.String WYSIWYG_INLINE_EDIT_REQUEST_PARAMETER
- See Also:
- Constant Field Values
-
channel
protected static final Channel channel
-
DISPLAY_URL_EXTRA_INFO
public static final java.lang.String DISPLAY_URL_EXTRA_INFO
Extra info to key to override default display URL String.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 ofdata.getDisplayUrl()returns"customDisplay.jsp?id=...".- See Also:
- Constant Field Values
-
WRITE_IN_PROGRESS_EXTRA_INFO
public static final java.lang.String WRITE_IN_PROGRESS_EXTRA_INFO
Flag set before beforeWrite and afterWrite, which indicates if the data received in DataControllers or StoreListener is "up-to-date" or maybe has modifications in progress.Such modifications could require custom code to be compliant with "non up-to-date" indexes for example, and should work with received fresh Data instead.
- Since:
- jcms-10.0.6
- See Also:
- Constant Field Values
-
author
protected Member author
-
authorDBID
protected java.lang.String authorDBID
-
opAuthor
protected Member opAuthor
-
opDelegate
protected Member opDelegate
-
extension
protected DataExtension extension
-
importMap
protected java.util.HashMap<java.lang.String,java.lang.Object> importMap
-
extraDataMap
protected java.util.HashMap<java.lang.String,java.lang.String> extraDataMap
-
extraDBDataMapToSaveOnOp
protected transient java.util.Map<java.lang.String,java.lang.String> extraDBDataMapToSaveOnOp
-
-
Constructor Detail
-
Data
public Data()
-
Data
public Data(Member author, DataExtension extension)
-
Data
public Data(Data other)
-
-
Method Detail
-
getDataName
public 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.
- The Title (multi-language) for a Publication.
- The Name (multi-language) for a Category.
- The Name for a Group, a Member.
- The Title (multi-language) for a Workspace.
Default behaviour is to return toFullString() of Data or empty string if toFullString is null.- Parameters:
language- the language in which to return the name if multilang available for the data.- Returns:
- a String, MUST NOT return null.
-
getLangPropertyValue
public 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.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.- Specified by:
getLangPropertyValuein interfaceLangPropertyArgument- Parameters:
language- the ISO-639 language code to be used to retrieve the localized Object's name- Returns:
- this object as a string value in the specified language
-
getDataImage
public java.lang.String getDataImage()
Retrieves the image path of this data in the channel's main language.This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
Default behaviour is to return empty string.- Returns:
- a path relative to the webapp root.
- Since:
- jcms-6.0.0
-
getDataImage
public java.lang.String getDataImage(java.lang.String lang, boolean useDefault)Retrieves the image path of this data.This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
Default behaviour is to return empty string.- Parameters:
lang- the user language (ISO-639 language code)useDefault- should the default language be used if no value is found for the specified language- Returns:
- a path relative to the webapp root.
- Since:
- jcms-6.0.0
-
getDataImage
public java.lang.String getDataImage(java.lang.String lang)
Retrieves the image path of this data in the specified language.- Parameters:
lang- the user language (ISO-639 language code)- Returns:
- a path relative to the webapp root.
- Since:
- jcms-6.0.0
-
getGenericThumbnail
public java.lang.String getGenericThumbnail()
Returns a generic thumbnail for this Data. As defined by propertiestypes.{short-class-name}.thumb.If no property was defined for the class of this Data, the thumbnail specified in property
types.unknown.thumbis used.FileDocument uses its own implementation, see
FileDocument.getGenericThumbnail().- Returns:
- a thumbnail path relative to the webapp root, eg
images/jalios/icons/data/article.gif - Since:
- jcms-6.1.1
-
getGenericThumbnail
public java.lang.String getGenericThumbnail(java.lang.String defaultThumb)
Returns a generic thumbnail for this Data. As defined by propertiestypes.{short-class-name}.thumb.If no property was defined for the class of this Data, the thumbnail specified in property
types.unknown.thumbis used.FileDocument uses its own implementation, see
FileDocument.getGenericThumbnail().- Parameters:
defaultThumb- the default thumbnail to use (can be null)- Returns:
- a thumbnail path relative to the webapp root, eg
images/jalios/icons/data/article.gif - Since:
- jcms-10.0.5
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toFullString
public java.lang.String toFullString()
-
toCSV
public java.lang.String toCSV(java.lang.String lang)
Returns a CSV view of this object- Parameters:
lang- the output language- Returns:
- a CSV view of this object
- Since:
- jcms-5.0.0
-
getCSVHeader
public static java.lang.String getCSVHeader(java.lang.String lang)
Returns the CSV header of this object- Parameters:
lang- the output language- Returns:
- the CSV header of this object
- Since:
- jcms-5.0.0
-
updateIndexTreeSet
protected void updateIndexTreeSet(java.lang.String indexName, java.lang.Object obj, boolean add)Update the given index.
When used inside a StoreListener, in the methodStoreListener.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 usingBasicStorable.compareTo(BasicStorable)orBasicStorable.hashCode()methods.- Parameters:
indexName- the name of the indexobj- the object to be added or removedadd- add if true, remove if false- Since:
- jcms-5.0.1
-
getLinkIndexedDataSet
public <T> java.util.TreeSet<T> getLinkIndexedDataSet(java.lang.Class<T> clazz)
Returns all the JStore data, instance of the specified class, that references this Data directly through a dedicated field.Included in results:
- JStore Publication instance that references this Data through a dedicated field.
Excluded from results (non exhaustive list):
- DBData.
- JStore data that references this Publication through wiki and wysiwyg fields,
- ...
This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
- Type Parameters:
T- class of wanted objects- Parameters:
clazz- the class to search the referring instances- Returns:
- a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
- Since:
- jcms-3.0
- See Also:
getLinkIndexedDataSet(Class, String)
-
getLinkIndexedDataSet
public <T> java.util.TreeSet<T> getLinkIndexedDataSet(java.lang.Class<T> clazz, java.lang.String field)Returns all the JStore data, instance of the specified class, that references this Data directly through a dedicated field of the specified name.Included in results:
- JStore Publication instance that references this Data through a dedicated field.
Excluded from results (non exhaustive list):
- DBData.
- JStore data that references this Data through wiki and wysiwyg fields,
- ...
This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
- Type Parameters:
T- class of wanted objects- Parameters:
clazz- the class to search the referring instancesfield- the name of the field which contains the reference, return empty result if null- Returns:
- a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
- Since:
- jcms-4.1
- See Also:
getLinkIndexedDataSet(Class)
-
getLinkCount
public int getLinkCount()
- Returns:
- the number of instances referring this data
- Since:
- jcms-3.0
-
getReferrerSet
public java.util.Set getReferrerSet()
Returns the referrer set of this data.See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
- Returns:
- the referrer set of this data.
- Since:
- jcms-9.0.0
-
getAllReferrerSet
public java.util.TreeSet getAllReferrerSet(java.lang.Class referrerClass)
Returns all the JStore data, instance of the specified class, that references this Data directly or indirectly through a dedicated field.Included in results:
- JStore Publication instance that references this Data through a dedicated field.
- JStore Publication instance that references a JStore Data that reference this Data through a dedicated field (and recursively...).
Excluded from results (non exhaustive list):
- DBData.
- JStore data that references this Data through wiki and wysiwyg fields,
- ...
This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
Implementation note: recursively invoke
getLinkIndexedDataSet(Class)- Parameters:
referrerClass- the class to search the referring instances- Returns:
- a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
- Since:
- jcms-4.1
- See Also:
getLinkIndexedDataSet(Class, String),getLinkIndexedDataSet(Class),getAllReferrerSet()
-
getAllReferrerSet
public java.util.TreeSet getAllReferrerSet()
Returns all the JStore data that references this Data directly or indirectly through a dedicated field.Included in results:
- JStore Publication instance that references this Data through a dedicated field.
- JStore Publication instance that references a JStore Data that reference this Data through a dedicated field (and recursively...).
Excluded from results (non exhaustive list):
- DBData.
- JStore data that references this Data through wiki and wysiwyg fields,
- ...
This method is supported on DBData, it can be invoked on both JStore or DBData objects (since jcms-10.0.4 / JCMS-7832).
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
Implementation note: recursively invoke
getLinkIndexedDataSet(Class)- Returns:
- a TreeSet of Data, never return null : an empty set is returned if invalid parameters where specified or when not referrer could be found
- Since:
- jcms-4.1
- See Also:
getLinkIndexedDataSet(Class, String),getLinkIndexedDataSet(Class),getAllReferrerSet(Class)
-
fillExportXmlFieldAttributes
public void fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
Fill the given string buffer with specific attributes of this data.- Parameters:
sb- the StringBuffer- Since:
- jcms-5.7.1
-
getExportXmlDataValue
public java.lang.String getExportXmlDataValue()
Returns a string representation of this data used by exportXml().- Returns:
- a string representation of this data used by exportXml().
- Since:
- jcms-5.7.2
-
importXml
public void importXml(org.jdom.Element elt, ImportOptions options)Fill this data with the values contains in the JDOM element.- Parameters:
elt- the JDOM elementoptions- the ImportOptions- Since:
- jcms-5.7.0
-
importXmlReferences
public void importXmlReferences(org.jdom.Element elt, ImportOptions options)Resolves imported references for this data.- Parameters:
elt- the JDOM elementoptions- the ImportOptions- Since:
- jcms-6.0.0
-
importXmlFieldsWithReferences
protected void importXmlFieldsWithReferences(org.jdom.Element elt, ImportOptions options)
-
importXmlFiles
public void importXmlFiles(java.util.Map fieldFileMap, ImportOptions options)
-
exportXml
public java.lang.String exportXml()
Returns the XML export this data.- Returns:
- the XML export for the given data. The returned String does not contain the XML declaration (<?xml>).
- Since:
- jcms-5.7.2
-
exportXml
public java.lang.String exportXml(java.lang.String[] relateds)
Returns the XML export this data.- Parameters:
relateds- possible relateds to be added to the export- Returns:
- the XML export for the given data. The returned String does not contain the XML declaration (<?xml>).
- Since:
- jcms-5.7.2
-
exportXml
public java.lang.StringBuffer exportXml(java.lang.StringBuffer sb, java.lang.String[] relateds)Fill the given StringBuffer with the XML export this data. The StringBuffer does not contain the XML declaration (<?xml>).- Parameters:
sb- the StringBufferrelateds- possible relateds to be added to the export- Returns:
- the given in parameter sb parameter with content added
- Since:
- jcms-5.7.2
-
exportXml
public java.lang.StringBuffer exportXml(java.lang.StringBuffer sb, java.lang.String[] relateds, int indentLevel)Fill the given StringBuffer with the XML export this data. The StringBuffer does not contain the XML declaration (<?xml>).- Parameters:
sb- the StringBuffer.relateds- possible relateds to be added to the exportindentLevel- indentation level to be used.- Returns:
- the given in parameter sb parameter with content added
- Since:
- jcms-5.7.2
-
exportXmlField
public void exportXmlField(java.lang.StringBuffer sb, int indentLevel)Fills the given StringBuffer with Xml export of fields of this data.- Parameters:
sb- the StringBufferindentLevel- the indent level- Since:
- jcms-5.7.2
-
exportXmlRelated
public void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String[] relateds, int indentLevel)Fills the given StringBuffer with Xml export of related of this data. Related are data computed or stored in memory (index), but not persisted as is. Only invoked related are given (through relateds parameter).- Parameters:
sb- the StringBufferrelateds- possible relateds to be added to the exportindentLevel- the indent level- Since:
- JCMS-6.1
-
exportXmlRelated
protected void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)
-
isImported
public boolean isImported()
Returns true if this data has been imported.- Returns:
- true if this data has been imported.
- Since:
- jcms-5.7.2
-
setMdate
public void setMdate(java.util.Date v)
Set the value of mdate- Specified by:
setMdatein interfaceStorable- Overrides:
setMdatein classBasicStorable- Parameters:
v- Value to assign to mdate.- Since:
- jcms-5.7.2
-
markNewImport
public void markNewImport()
Internal method used to mark an imported data. Use with care.- Since:
- jcms-5.7.2
-
unmarkNewImport
public void unmarkNewImport()
Internal method used to unmark an imported data. Use with care.- Since:
- jcms-6.0.0
-
getImportMap
public java.util.HashMap<java.lang.String,java.lang.Object> getImportMap()
Get the value of importMap.- Returns:
- Value of importMap.
- Since:
- jcms-5.7.2
-
setImportMap
public void setImportMap(java.util.HashMap<java.lang.String,java.lang.Object> v)
Set the value of importMap.- Parameters:
v- Value to assign to importMap.- Since:
- jcms-5.7.2
-
getImportId
public java.lang.String getImportId()
Get the value of importId.- Returns:
- Value of importId.
- Since:
- jcms-5.7.2
-
setImportId
public void setImportId(java.lang.String v)
Set the value of importId.- Parameters:
v- Value to assign to importId.- Since:
- jcms-5.7.2
-
getImportDate
public java.util.Date getImportDate()
Get the value of importDate.- Returns:
- Value of importDate.
- Since:
- jcms-5.7.2
-
setImportDate
public void setImportDate(java.util.Date v)
Set the value of importDate.- Parameters:
v- Value to assign to importDate.- Since:
- jcms-5.7.2
-
getImportMdate
public java.util.Date getImportMdate()
Get the value of importMdate.- Returns:
- Value of importMdate.
- Since:
- jcms-5.7.2
-
setImportMdate
public void setImportMdate(java.util.Date v)
Set the value of importMdate.- Parameters:
v- Value to assign to importMdate.- Since:
- jcms-5.7.2
-
getImportBatch
public java.lang.String getImportBatch()
Get the value of importBatch.- Returns:
- Value of importBatch.
- Since:
- jcms-5.7.2
-
setImportBatch
public void setImportBatch(java.lang.String v)
Set the value of importBatch.- Parameters:
v- Value to assign to importBatch.- Since:
- jcms-5.7.2
-
isImportUpdated
public boolean isImportUpdated()
Get the value of isImportUpdated.- Returns:
- Value of isImportUpdated.
- Since:
- jcms-5.7.2
-
setImportUpdated
public void setImportUpdated(boolean v)
Set the value of isImportUpdated.- Parameters:
v- Value to assign to isImportUpdated.- Since:
- jcms-5.7.2
-
getImportSignature
public java.lang.String getImportSignature()
Get the value of importSignature.- Returns:
- Value of importSignature.
- Since:
- jcms-5.7.2
-
setImportSignature
public void setImportSignature(java.lang.String v)
Set the value of importSignature.- Parameters:
v- Value to assign to importSignature.- Since:
- jcms-5.7.2
-
getImportSource
public java.lang.String getImportSource()
Get the value of importSource.- Returns:
- Value of importSource.
- Since:
- jcms-5.7.2
-
setImportSource
public void setImportSource(java.lang.String v)
Set the value of importSource.- Parameters:
v- Value to assign to importSource.- Since:
- jcms-5.7.2
-
getImportSourceUrl
public java.lang.String getImportSourceUrl()
Get the value of importSourceUrl.- Returns:
- Value of importSourceUrl.
- Since:
- jcms-5.7.2
-
setImportSourceUrl
public void setImportSourceUrl(java.lang.String v)
Set the value of importSourceUrl.- Parameters:
v- Value to assign to importSourceUrl.- Since:
- jcms-5.7.2
-
getImportAuthor
public java.lang.String getImportAuthor()
Get the value of importAuthor.- Returns:
- Value of importAuthor.
- Since:
- jcms-5.7.2
-
setImportAuthor
public void setImportAuthor(java.lang.String v)
Set the value of importAuthor.- Parameters:
v- Value to assign to importAuthor.- Since:
- jcms-5.7.2
-
getImportDisplayUrl
public java.lang.String getImportDisplayUrl()
Get the value of importDisplayUrl.- Returns:
- Value of importDisplayUrl.
- Since:
- jcms-5.7.2
-
setImportDisplayUrl
public void setImportDisplayUrl(java.lang.String v)
Set the value of importAuthor.- Parameters:
v- Value to assign to importAuthor.- Since:
- jcms-5.7.2
-
getImportUrl
public java.lang.String getImportUrl()
Returns the import URL of this publication, i.e. the XML export URL of the original data.- Returns:
- the import URL of this publication.
- Since:
- jcms-5.7.2
-
getAuthor
public Member getAuthor()
Returns the author of this Data. If the author is a DBMember it is loaded. This method must not be called before the database as been initialized (e.g. it must not be called by a StoreListener). The author returned by method must not be kept in data structures that are longer than the DB transaction (e.g. an index). In those cases, call getAuthor(false).- Returns:
- the author of this Data.
- See Also:
getAuthor(boolean)
-
getAuthor
public Member getAuthor(boolean queryDB)
Returns the author of this Data. If queryDB is true query the DB to find the author from authorDBID.- Parameters:
queryDB- indicates if the database must be queried.- Returns:
- the author of this Data.
- Since:
- jcms-6.1.0
-
setAuthor
public void setAuthor(Member v)
Sets the author of this Data- Parameters:
v- the author- Since:
- jcms-6.1.0
-
getAuthorDBID
public java.lang.String getAuthorDBID()
Returns a JCMS ID of the author if it is persisted in the DB.- Returns:
- a JCMS ID.
- Since:
- jcms-6.1.0
-
setAuthorDBID
public void setAuthorDBID(java.lang.String v)
Sets the authorDBID of this Data.- Parameters:
v- the authorDBID- Since:
- jcms-6.1.0
-
getOpAuthor
public Member getOpAuthor()
Get the value of opAuthor.- Returns:
- Value of opAuthor.
- Since:
- jcms-4.0
-
setOpAuthor
public void setOpAuthor(Member v)
Set the value of opAuthor.- Parameters:
v- Value to assign to opAuthor.- Since:
- jcms-4.0
-
getOpAuthorId
public java.lang.String getOpAuthorId()
Returns the JStore ID of the op author (only for DBData)- Returns:
- the JStore ID of the op author (only for DBData)
- Since:
- jcms-10.0.5 / JCMS-8387
-
setOpAuthorId
public void setOpAuthorId(java.lang.String opAuthorId)
Sets the JStore ID of the op author (only for DBData).- Parameters:
opAuthorId- the JStore op author id- Since:
- jcms-10.0.5 / JCMS-8387
-
getOpDelegate
public 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.- Returns:
- Value of opDelegate.
- Since:
- jcms-5.7.0
-
setOpDelegate
public 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.- Parameters:
mbr- Value to assign to opDelegate.- Since:
- jcms-5.7.0
-
getExtension
public DataExtension getExtension()
Get the value of extension.- Returns:
- Value of extension.
-
setExtension
public void setExtension(DataExtension v)
Set the value of extension.- Parameters:
v- Value to assign to extension.
-
getDate
public 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.- Parameters:
dateType- the date type- Returns:
- the date
- Since:
- jcms-4.0
-
getDate
public 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.- Parameters:
dateType- the date typedefaultDate- the default date- Returns:
- the date
- Since:
- jcms-4.0
-
getCdateSelector
public static Data.CdateSelector getCdateSelector(java.util.Date begin, java.util.Date end)
-
getMdateSelector
public static Data.MdateSelector getMdateSelector(java.util.Date begin, java.util.Date end)
-
getDateSelector
public static DataSelector getDateSelector(java.lang.String str, java.util.Date begin, java.util.Date end)
Retrieves a newDataSelectorgiven a name representing it. The returned selector can be passed to the methodJcmsUtil.applyDataSelector(java.util.Collection, DataSelector)to allow precise control over the selection ofDatain aCollection.You can specify any of the following value:
null,"date","cdate":getCdateSelector(Date begin, Date end)"mdate":getMdateSelector(Date begin, Date end)
- Parameters:
str- a string representing the selectorbegin- the beginDateto use for selectionend- the endDateto use for selection- Returns:
- a new instance of
Comparator.
-
getImportSelector
public static DataSelector getImportSelector()
-
getDeletableSelector
public static DataSelector getDeletableSelector(Member opAuthor)
-
getAuthorSelector
public static DataSelector getAuthorSelector(Member author)
-
getCaddyComparator
public static <T extends Data> java.util.Comparator<T> getCaddyComparator()
- Type Parameters:
T- subclass of Data- Returns:
- a new instance of
CaddyComparator. - Since:
- jcms-5.7
-
getAuthorComparator
public static <T extends Data> java.util.Comparator<T> getAuthorComparator(java.util.Comparator<Member> memberComparator)
- Type Parameters:
T- subclass of Data- Parameters:
memberComparator- a member comparator- Returns:
- a new instance of
Data.AuthorComparatorbuilt with the given member comparator, usually aMember.getNameComparator().
-
getOpAuthorComparator
public static <T extends Data> java.util.Comparator<T> getOpAuthorComparator(java.util.Comparator<Member> memberComparator)
- Type Parameters:
T- subclass of Data- Parameters:
memberComparator- a Member comparator- Returns:
- a new instance of
Data.OpAuthorComparatorbuilt with the given member comparator, usually aMember.getNameComparator(). - Since:
- jcms-4.0
-
getDataNameComparator
public static <T extends Data> java.util.Comparator<T> getDataNameComparator(java.lang.String language)
- Type Parameters:
T- subclass of Data- Parameters:
language- the language that will be used by the DataNameComparator- Returns:
- a new DataNameComparator built with the given language.
- Since:
- jcms-5.5.0
-
getRowIdComparator
public static <T extends Data> java.util.Comparator<T> getRowIdComparator()
- Type Parameters:
T- subclass of Data- Returns:
- a new RowIdComparator
- Since:
- jcms-6.2.0
-
getComparator
public static <T extends Data> java.util.Comparator<T> getComparator(java.lang.String str, boolean reverse)
Deprecated.Retrieves a newComparatorgiven a name representing it. The returned comparator can be used to sort anyCollectioncontainingDatas.
You can specify any of the following value:null,"date","cdate":BasicStorable.getCdateComparator()"mdate":BasicStorable.getMdateComparator()"author":getAuthorComparator(Comparator)with aMember.getNameComparator()"opauthor":getOpAuthorComparator(Comparator)with aMember.getNameComparator()"id":BasicStorable.getIdComparator()"caddy":getCaddyComparator(), since jcms-5.7.
- Type Parameters:
T- specialization of Data- Parameters:
str- a string representing the comparatorreverse- a boolean indicating whether the comparator should have its behavior reversed (true) or unchanged (false)- Returns:
- a new instance of
Comparator.
-
getStrongLockSelector
public static DataSelector getStrongLockSelector()
Retrieves a new instance of DataSelector based on the strong lock status of the data.- Returns:
- a new instance of
Data.StrongLockSelector - Since:
- jcms-6.2.0
-
setExtraInfo
public java.lang.Object setExtraInfo(java.lang.String name, java.lang.Object obj)Stores an extra information in thisData.
If the object passed in is null, the effect is the same as callingremoveExtraInfo(java.lang.String).
Data's extra information are transient (not stored upon a site restart).- Parameters:
name- aStringspecifying the name of the extra infoobj- theObjectto be stored- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Since:
- jcms-5.5.0
-
removeExtraInfo
public java.lang.Object removeExtraInfo(java.lang.String name)
Removes an extra information from thisData.- Parameters:
name- aStringspecifying the name of the extra info- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Since:
- jcms-5.5.0
-
getExtraInfo
public java.lang.Object getExtraInfo(java.lang.String name)
Returns the value of the named extra info as anObject, ornullif no extra info of the given name exists.- Parameters:
name- the name of the extrainfo to retrieve- Returns:
- previous value associated with specified name, or
nullif there is no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Since:
- jcms-5.5.0
-
getExtraInfoMap
public java.util.Map<java.lang.String,java.lang.Object> getExtraInfoMap()
Returns a java.util.Map of the extra infos of this results.- Returns:
- the internal Map used by this results, modify with care.
- Since:
- jcms-5.5.0
-
getExtraDataMap
public java.util.HashMap<java.lang.String,java.lang.String> getExtraDataMap()
Returns a java.util.Map of the extra infos of this results.- Returns:
- the internal Map used by this results, modify with care.
- Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData- Since:
- jcms-5.7.1
-
setExtraDataMap
public void setExtraDataMap(java.util.HashMap<java.lang.String,java.lang.String> extraDataMap)
Override the current extraDataMap with the given one- Parameters:
extraDataMap- the new extraDataMap- Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData- Since:
- jcms-5.7.1
-
getExtraData
public java.lang.String getExtraData(java.lang.String name)
Returns the value of the named extra data as anString, ornullif no extra info of the given name exists.- Parameters:
name- aStringspecifying the name of the extra data to retrieve- Returns:
- previous value associated with specified name, or
nullif there is no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData- Since:
- jcms-5.7.1
-
setExtraData
public java.lang.String setExtraData(java.lang.String name, java.lang.String value)Stores an extra data in thisData.
If the object passed in is null, the effect is the same as callingremoveExtraData(java.lang.String).- Parameters:
name- aStringspecifying the name of the extra datavalue- theStringto be stored- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData- Since:
- jcms-5.7.1
-
removeExtraData
public java.lang.String removeExtraData(java.lang.String name)
Removes an extra data from thisData.- Parameters:
name- aStringspecifying the name of the extra data- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData- Since:
- jcms-5.7.1
-
getNewDefaultExtraDataMap
@Deprecated public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz, boolean shortKey)
Deprecated.Returns aTreeMaprepresenting the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted- Parameters:
clazz- the class to work withshortKey- if true, returns a Map using short properties (someprop instead of someprop.boolean)- Returns:
- TreeMap object
- Since:
- jcms-5.7.1
-
getNewDefaultExtraDataMap
public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(java.lang.Class<? extends Data> clazz, java.lang.String suffix, boolean shortKey)
Returns aTreeMaprepresenting the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted- Parameters:
clazz- the class to work withsuffix- a suffix to the propertiesshortKey- if true, returns a Map using short properties (someprop instead of someprop.boolean)- Returns:
- TreeMap object
- Since:
- jcms-5.7.4
-
getNewDefaultExtraDataMap
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)
Returns aTreeMaprepresenting the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted- Parameters:
clazz- the class to work withsuffix- a suffix to the propertiesshortKey- return a Map using short propertiesuseSuperClasses- true to retrieve default extradata for super classes of the specified class- Returns:
- TreeMap object
- Since:
- jcms-5.7.5
-
getNewDefaultExtraDataMap
public java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDataMap(boolean shortKey)
Returns aLangPropertiesrepresenting the Extra Data description and default values.- Parameters:
shortKey- if true, returns a Map using short properties (someprop instead of someprop.boolean)- Returns:
- LangProperties object
- Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData- Since:
- jcms-5.7.1
-
updateExtraDataMap
public void updateExtraDataMap(java.lang.String[] keys, java.lang.String[] values)Update editable ExtraDBData of this data with the updated/new specified key/valueThis 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)
- Parameters:
keys- String[] representing authorized propertiesvalues- String[] representing new values of properties- Throws:
java.lang.IllegalStateException- if this method is invoked on instance of DBData
-
getExtraDBDataMap
public java.util.Map<java.lang.String,java.lang.String> getExtraDBDataMap()
Returns a java.util.Map of the extra infos of this results.- Returns:
- the internal and unmodifiable Map.
- Since:
- jcms-6.0
-
setExtraDBDataMap
public void setExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap)
Override the current extraDBDataMap with the given one- Parameters:
extraDBDataMap- the new extraDBDataMap- Since:
- jcms-6.0
-
setExtraDBDataMap
public void setExtraDBDataMap(java.util.Map<java.lang.String,java.lang.String> extraDBDataMap, boolean inMemoryOnly)Override the current extraDBDataMap with the given one- Parameters:
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 later- Since:
- jcms-7.0.1
-
getExtraDBData
public java.lang.String getExtraDBData(java.lang.String name)
Returns the value of the named extra data as anString, ornullif no extra info of the given name exists.- Parameters:
name- aStringspecifying the name of the extra data to retrieve- Returns:
- value associated with specified name, or
nullif there is no mapping for name. - Since:
- jcms-6.0
-
setExtraDBData
public java.lang.String setExtraDBData(java.lang.String name, java.lang.String value)Stores an extra data in thisData.
If the object passed in is null, the effect is the same as callingremoveExtraDBData(String).- Parameters:
name- aStringspecifying the name of the extra datavalue- theStringto be stored- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Since:
- jcms-6.0
-
removeExtraDBData
public java.lang.String removeExtraDBData(java.lang.String name)
Removes an extra data from thisData.- Parameters:
name- aStringspecifying the name of the extra data- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated with the specified name. - Since:
- jcms-6.0
-
getNewDefaultExtraDBDataMap
@Deprecated public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz, boolean shortKey)
Deprecated.Returns aTreeMaprepresenting the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted- Parameters:
clazz- the class to work withshortKey- if true, returns a Map using short properties (someprop instead of someprop.boolean)- Returns:
- TreeMap object
- Since:
- jcms-6.0
-
getNewDefaultExtraDBDataMap
public static java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(java.lang.Class<? extends Data> clazz, java.lang.String suffix, boolean shortKey)
Returns aTreeMaprepresenting the Extra Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted- Parameters:
clazz- the class to work withsuffix- a suffix to the propertiesshortKey- if true, returns a Map using short properties (someprop instead of someprop.boolean)- Returns:
- TreeMap object
- Since:
- jcms-6.0
-
getNewDefaultExtraDBDataMap
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)
Returns aTreeMaprepresenting the Extra DB Data description and default value. Note: this implementation always create a new TreeMap because keys are sorted- Parameters:
clazz- the class to work withsuffix- a suffix to the propertiesshortKey- return a Map using short propertiesuseSuperClasses- true to retrieve default extradbdata for super classes of the specified class- Returns:
- TreeMap object
- Since:
- jcms-6.0
-
getNewDefaultExtraDBDataMap
public java.util.TreeMap<java.lang.String,java.lang.String> getNewDefaultExtraDBDataMap(boolean shortKey)
Returns aLangPropertiesrepresenting the Extra Data description and default values.- Parameters:
shortKey- if true, returns a Map using short properties (someprop instead of someprop.boolean)- Returns:
- LangProperties object
- Since:
- jcms-6.0
-
updateExtraDBDataMap
public void updateExtraDBDataMap(java.lang.String[] keys, java.lang.String[] values)Update editable ExtraDBData of this data with the updated/new specified key/value.
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.
- Parameters:
keys- String[] representing authorized propertiesvalues- String[] representing new values of properties- Since:
- jcms-6.0
-
lock
public void lock(Member mbr)
Locks this data for a given member.- Parameters:
mbr- the member who locks this data- Since:
- jcms-5.5.0
-
unlock
public void unlock(Member mbr)
Unlocks this data if lock has been put by the given member.- Parameters:
mbr- the member who locked this data- Since:
- jcms-5.5.0
-
unlock
public void unlock()
Unlocks this data.- Since:
- jcms-5.5.0
-
getLockMember
public Member getLockMember()
Return the member who locked this data- Returns:
- the member who locked this data
- Since:
- jcms-5.5.0
-
getLockDate
public java.util.Date getLockDate()
Returns the lock date.- Returns:
- the lock date
- Since:
- jcms-5.5.0
-
isLocked
public boolean isLocked()
Returns true if this data is locked.- Returns:
- true if this data is locked.
- Since:
- jcms-5.5.0
-
checkLockMember
public boolean checkLockMember(Member mbr)
Returns true if the given member has locked the given data or if the data is not locked.- Parameters:
mbr- the member- Returns:
- true if the given member has locked the given data or if the data is not locked.
- Since:
- jcms-7.0.0
-
getStrongLockMember
public Member getStrongLockMember()
Returns the member who has strongly locked this Data.- Returns:
- the member who has strongly locked this Data.
- Since:
- jcms-7.0.0
-
getStrongLockDate
public java.util.Date getStrongLockDate()
Returns the date of the strong lock.- Returns:
- the date of the strong lock.
- Since:
- jcms-7.0.0
-
getStrongLockContextData
public java.lang.String getStrongLockContextData()
Return the StrongLock context data (if available)- Returns:
- the
StrongLockcontext data
-
getStrongLockContext
public java.lang.String getStrongLockContext()
Return the StrongLock context (if available)- Returns:
- the
StrongLockcontext
-
putStrongLock
public void putStrongLock(Member mbr)
Put (and save) a strong lock on this Data.- Parameters:
mbr- the member who puts the strong lock.- Since:
- jcms-7.0.0
-
putStrongLock
public void putStrongLock(Member mbr, java.lang.String context, java.lang.String contextData)
Put (and save) a strong lock on this Data.- Parameters:
mbr- the member who puts the strong lock.context- the lock contextcontextData- the lock context data (custom data used by context manager)- Since:
- jcms-10.0.2
-
releaseStrongLock
public void releaseStrongLock(Member mbr)
Release the lock on this Data- Parameters:
mbr- the member who releases the lock (only the member who has locked and the admin can release the lock).- Since:
- jcms-7.0.0
-
releaseStrongLock
public void releaseStrongLock()
Releases the strong lock, without checking the member.- Since:
- jcms-7.0.0
-
getStrongLockInfo
public 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)- Parameters:
locale- the locale- Returns:
- a string which explains who has the lock.
- Since:
- jcms-7.0.0
-
canRequestUnlock
public boolean canRequestUnlock(Member mbr)
Returns true if the given member can request to unlock this data.- Parameters:
mbr- the member who request the lock- Returns:
- true if the given member can request to unlock this data.
- Since:
- jcms-8.0.0
-
canBeUnlockedBy
public boolean canBeUnlockedBy(Member mbr)
Returns true if the given member can unlock this data.- Parameters:
mbr- the member- Returns:
- true if the given member can unlock this data.
- Since:
- jcms-9.0.0
-
getStrongLock
public StrongLock getStrongLock()
Returns the StrongLock bound to this Data, if any.- Returns:
- the StrongLock instance if there is any for this Data, null otherwise
- Since:
- jcms-6.2.0
- See Also:
StrongLockManager.getStrongLock(Data)
-
isStrongLocked
public boolean isStrongLocked()
Check if this data is strongly locked.- Returns:
- true if this Data has a StrongLock, false otherwise
- Since:
- jcms-6.2.0
- See Also:
StrongLockManager.isLocked(Data)
-
checkStrongLockMember
public boolean checkStrongLockMember(Member mbr)
Check if the specified member has locked this Data or if the Data is not locked.- Parameters:
mbr- the member to check- Returns:
- true if the given member has locked the given data or if the data is not locked.
- Since:
- jcms-6.2.0
- See Also:
StrongLockManager.checkLockMember(Data, Member)
-
checkStrongLockMember
public boolean checkStrongLockMember(Member mbr, boolean useCache)
Check if the specified member has locked this Data or if the Data is not locked.- Parameters:
mbr- the member to checkuseCache- indicate if the cache can be used- Returns:
- true if the given member has locked the given data or if the data is not locked.
- Since:
- jcms-10.0.1
- See Also:
StrongLockManager.checkLockMember(Data, Member)
-
getLockInfo
public java.lang.String getLockInfo(java.lang.String userLang, java.util.Locale userLocale, boolean confirm)Returns an information message about the lock state.- Parameters:
userLang- the user languageuserLocale- the user localeconfirm- true for a confirm message- Returns:
- an information message about the lock state.
- Since:
- jcms-6.2.0
-
canBeReadBy
public final boolean canBeReadBy(Member member)
Checks if the specified member is authorized to read this Data.This method is a convenient invocation of
canBeReadBy(Member, boolean, RightInfo), in which searchInGroups is requested a newRightInfoinstance is systematically provided.- Parameters:
member- the member to check (may be null for anonymous user)- Returns:
- true if the member can read this Data, false otherwise
- Since:
- jcms-10.0.0, JCMS-6017
- See Also:
canBeReadBy(Member, boolean, RightInfo)
-
canBeReadBy
public boolean canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
Checks if the specified member is authorized to read this Data.- Parameters:
member- the member to check (may be null for anonymous user)searchInGroups- set to true to check for read right authorization using Member's group(s).rightInfo- aRightInfoinstance in which explanation of read right authorization acceptance or refusal will be indicated. Value is required and cannot be null.- Returns:
- true if the member can read this Data, false otherwise
- Since:
- jcms-10.0.0, JCMS-6017
-
getReadAuthorizedSelector
public static Data.AuthorizedSelector getReadAuthorizedSelector(Member member)
Retrieve a newData.AuthorizedSelectorinstance for the specified member.- Parameters:
member- the member for which read operation are being verified- Returns:
- a new instance of
Data.AuthorizedSelectorusing the givenMember. - Since:
- jcms-10.0.1 (with JCMS-4784)
-
getUpdateInstance
public Data getUpdateInstance()
Returns an instance of this object to update it.- Returns:
- an instance of this object to update it.
- Since:
- jcms-6.0.0
-
checkIntegrity
public ControllerStatus checkIntegrity()
Checks whether or not data integrity constraints are respected.- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkIntegrity
public ControllerStatus checkIntegrity(java.util.Map context)
Checks whether or not data integrity constraints are respected.- Parameters:
context- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-6.1.0
-
getFieldStatusMap
public 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).- Parameters:
mbr- the member- Returns:
- the FieldStatus map (the field names are the keys)
- Since:
- jcms-6.0.1
-
checkWrite
public ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
Checks if the given write operation can be performed- Parameters:
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)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkMember
public ControllerStatus checkMember(int op, Member mbr, java.util.Map context)
Checks if the given member can perform the given operation. This method is called by checkWrite. It should be overrided by sub-classes.- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkCreate
public ControllerStatus checkCreate(Member mbr)
Checks if the creation can be performed- Parameters:
mbr- the member which requests the write operation- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkCreate
public ControllerStatus checkCreate(Member mbr, java.util.Map context)
Checks if the creation can be performed- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkUpdate
public ControllerStatus checkUpdate(Member mbr)
Checks if the update can be performed- Parameters:
mbr- the member which requests the write operation- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkUpdate
public ControllerStatus checkUpdate(Member mbr, java.util.Map context)
Checks if the update can be performed- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkDelete
public ControllerStatus checkDelete(Member mbr)
Checks if the deletion can be performed- Parameters:
mbr- the member which requests the write operation- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkDelete
public ControllerStatus checkDelete(Member mbr, java.util.Map context)
Checks if the deletion can be performed- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
getVirtualIDSet
public java.util.Set<java.lang.String> getVirtualIDSet()
Returns the set of virtual ID bound to this data (or null if it does not exist).- Returns:
- the set of virtual ID bound to this data (or null if it does not exist).
- Since:
- jcms-8.0.0
-
checkAndPerformCreate
public final ControllerStatus checkAndPerformCreate(Member mbr)
Checks if the creation can be performed, and performs data creation. This method cannot be overridden.- Parameters:
mbr- the member which requests the write operation- Returns:
- a
ControllerStatus
-
checkAndPerformCreate
public ControllerStatus checkAndPerformCreate(Member mbr, java.util.Map<?,?> context)
Checks if the creation can be performed, and performs data creation.- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a
ControllerStatus
-
performCreate
public final void performCreate(Member mbr)
Performs data creation. This method cannot be overridden.- Parameters:
mbr- the member which requests the write operation- Since:
- jcms-5.0.0
-
performCreate
public void performCreate(Member mbr, java.util.Map context)
Performs data creation.- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
checkAndPerformUpdate
public final ControllerStatus checkAndPerformUpdate(Member mbr)
Checks if the update can be performed, and performs data update. This method cannot be overridden.- Parameters:
mbr- the member which requests the write operation- Returns:
- a
ControllerStatus
-
checkAndPerformUpdate
public ControllerStatus checkAndPerformUpdate(Member mbr, java.util.Map<?,?> context)
Checks if the update can be performed, and performs data update.- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a
ControllerStatus
-
performUpdate
public final void performUpdate(Member mbr)
Performs data update. This method cannot be overridden.- Parameters:
mbr- the member which requests the write operation- Since:
- jcms-5.0.0
-
performUpdate
public void performUpdate(Member mbr, java.util.Map context)
Performs data update.- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
prepareUpdateContext
public void prepareUpdateContext(java.util.Map context)
-
checkAndPerformDelete
public final ControllerStatus checkAndPerformDelete(Member mbr)
Checks if the deletion can be performed, and performs data deletion. This method cannot be overridden.- Parameters:
mbr- the member which requests the write operation- Returns:
- a
ControllerStatus
-
checkAndPerformDelete
public ControllerStatus checkAndPerformDelete(Member mbr, java.util.Map<?,?> context)
Checks if the deletion can be performed, and performs data deletion.- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a
ControllerStatus
-
performDelete
public final void performDelete(Member mbr)
Performs data deletion. This method cannot be overridden.- Parameters:
mbr- the member which requests the write operation- Since:
- jcms-5.0.0
-
performDelete
public void performDelete(Member mbr, java.util.Map context)
Performs data deletion.- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
performBeforeWrite
protected void performBeforeWrite(int op, Member mbr, java.util.Map context)Called to perform some action before the write.- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.7.2
-
splitHybridCollections
protected void splitHybridCollections(Data previousData)
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Parameters:
previousData- the previous data (provided for update only)- Since:
- jcms-10.0.2
-
cleanHybridCollections
protected void cleanHybridCollections()
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Since:
- jcms-10.0.1
-
performAfterWrite
protected void performAfterWrite(int op, Member mbr, java.util.Map context)Called to perform some action after the write.- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-6.0.0
-
getTypeEntry
public static TypeEntry getTypeEntry()
Returns the TypeEntry bound toData.
Default implementation forDatawill propably return null as no TypeEntry is available forData, this method is available mainly to be overriden by subclasses.- Returns:
- the TypeEntry bound to
Data. - Since:
- jcms-5.5
- See Also:
Channel.getTypeEntry(Class)
-
getTypeFieldsEntries
public static TypeFieldEntry[] getTypeFieldsEntries()
Return an array ofTypeFieldEntrybound toData.
This array does not contain inherited TypeFieldEntry from super classes ofData.
Default implementation forDatawill propably return an empty array as no TypeFieldEntry is available forData, this method is available mainly to be overriden by subclasses.- Returns:
- an array of
TypeFieldEntrycontaining all Field used byDataor an empty array (never return null) - Since:
- jcms-5.5
- See Also:
Channel.getTypeFieldEntries(Class)
-
getAllTypeFieldEntry
public static TypeFieldEntry[] getAllTypeFieldEntry()
Return an array ofTypeFieldEntrybound toData.
This array does contain inherited TypeFieldEntry from super classes ofData.
Default implementation forDatawill propably return an empty array as no TypeFieldEntry is available forData, this method is available mainly to be overriden by subclasses.- Returns:
- an array of
TypeFieldEntrycontaining all Field used byDataor an empty array (never return null) - Since:
- jcms-5.5
- See Also:
Channel.getAllTypeFieldEntries(Class)
-
getIntFieldValue
public int getIntFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldExceptionGets the value of the givenintfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.- Returns:
- the
intfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found.
-
setIntFieldValue
public void setIntFieldValue(java.lang.String fieldName, int value) throws java.lang.NoSuchFieldExceptionSets the value of the givenintfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.value- theintfield value- Throws:
java.lang.NoSuchFieldException- if the field was not found.- Since:
- jcms-7.0.0
-
getLongFieldValue
public long getLongFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldExceptionGets the value of the givenlongfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.- Returns:
- the
longfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found.
-
setLongFieldValue
public void setLongFieldValue(java.lang.String fieldName, long value) throws java.lang.NoSuchFieldExceptionSets the value of the givenlongfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.value- thelongfield value- Throws:
java.lang.NoSuchFieldException- if the field was not found.- Since:
- jcms-7.0.0
-
getDoubleFieldValue
public double getDoubleFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldExceptionGets the value of the givendoublefield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.- Returns:
- the
doublefield value - Throws:
java.lang.NoSuchFieldException- if the field was not found.
-
setDoubleFieldValue
public void setDoubleFieldValue(java.lang.String fieldName, double value) throws java.lang.NoSuchFieldExceptionSets the value of the givendoublefield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.value- thedoublefield value- Throws:
java.lang.NoSuchFieldException- if the field was not found.- Since:
- jcms-7.0.0
-
getBooleanFieldValue
public boolean getBooleanFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldExceptionGets the value of the givenbooleanfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.- Returns:
- the
booleanfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found.
-
setBooleanFieldValue
public void setBooleanFieldValue(java.lang.String fieldName, boolean value) throws java.lang.NoSuchFieldExceptionSets the value of the givenbooleanfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.value- thebooleanfield value- Throws:
java.lang.NoSuchFieldException- if the field was not found.- Since:
- jcms-7.0.0
-
getCategoryFieldValue
public java.util.TreeSet<Category> getCategoryFieldValue(java.lang.String fieldName, Member mbr) throws java.lang.NoSuchFieldException
Gets the value of the givenCategoryfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.mbr- the member used to check rigth access to categories.- Returns:
- a
TreeSetofCategory - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.
-
setCategoryFieldValue
public void setCategoryFieldValue(java.lang.String fieldName, java.util.TreeSet value) throws java.lang.NoSuchFieldExceptionSets the value of the givenCategoryfield name for the currentData.- Parameters:
fieldName- the field name from which to retrieve the field value.value-TreeSetofCategory- Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-7.0.0
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName) throws java.lang.NoSuchFieldExceptionGets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the default language will be used. If the field value is not available (empty) in the given language, the field value in the main language of this publication is return.
Do not retrieveCategoryfields, see #getCategoryFieldValue(Member).- Parameters:
fieldName- the field name from which to retrieve the field value.- Returns:
- the
Objectfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- See Also:
getFieldValue(String, String, boolean)
-
setFieldValue
public void setFieldValue(java.lang.String fieldName, java.lang.Object value) throws java.lang.NoSuchFieldExceptionSets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the default language will be used.
Do not setCategoryfields, see #setCategoryFieldValue(String, TreeSet).- Parameters:
fieldName- the field name from which to retrieve the field value.value- theObjectfield value- Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-7.0.0
- See Also:
setFieldValue(String, Object, String)
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName, java.lang.String lang) throws java.lang.NoSuchFieldExceptionGets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the given language will be used. If the field value is not available (empty) in the given language, the field value in the main language of this publication is return.
Do not retrieveCategoryfields, see #getCategoryFieldValue(String, Member).- Parameters:
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).- Returns:
- the
Objectfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- See Also:
getFieldValue(String, String, boolean)
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault) throws java.lang.NoSuchFieldExceptionGets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the given language will be used.
Do not retrieveCategoryfields, see #getCategoryFieldValue(String, Member).- Parameters:
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).- Returns:
- the
Objectfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.
-
setFieldValue
public void setFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang) throws java.lang.NoSuchFieldExceptionSets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the given language will be used.
Do not setCategoryfields, see #getCategoryFieldValue(String, Member).- Parameters:
fieldName- the field name from which to retrieve the field value.value- theObjectfield valuelang- the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).- Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-7.0.0
-
getFieldValue
public java.lang.Object getFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Gets the value of the givenObjectfield name for thisData.
Do not retrieveCategoryfields and primitive fields values.- Parameters:
ctxt- the current context in which this field's value is request.fieldName- the field name from which to retrieve the field value.- Returns:
- the
Objectfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- See Also:
PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
-
getIntFieldValue
public int getIntFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Gets the integer value of the specified field name for thisData.- Parameters:
ctxt- the current context in which this field's value is request.fieldName- the field name from which to retrieve the field value.- Returns:
- the
intfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-6.0.0
- See Also:
PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)
-
getLongFieldValue
public long getLongFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Gets the long value of the specified field name for thisData.- Parameters:
ctxt- the current context in which this field's value is request.fieldName- the field name from which to retrieve the field value.- Returns:
- the
longfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-6.0.2, jcms-6.1.1
- See Also:
PortalPolicyFilter.getLongFieldValue(JcmsJspContext, String, Data, long)
-
getDoubleFieldValue
public double getDoubleFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Gets the double value of the specified field name for thisData.- Parameters:
ctxt- the current context in which this field's value is request.fieldName- the field name from which to retrieve the field value.- Returns:
- the
doublefield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-6.0.2, jcms-6.1.1
- See Also:
PortalPolicyFilter.getDoubleFieldValue(JcmsJspContext, String, Data, double)
-
getBooleanFieldValue
public boolean getBooleanFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Gets the boolean value of the specified field name for thisData.- Parameters:
ctxt- the current context in which this field's value is request.fieldName- the field name from which to retrieve the field value.- Returns:
- the
booleanfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-6.0.2, jcms-6.1.1
- See Also:
PortalPolicyFilter.getBooleanFieldValue(JcmsJspContext, String, Data, boolean)
-
getCategoryFieldValue
public java.util.TreeSet<Category> getCategoryFieldValue(JcmsJspContext ctxt, java.lang.String fieldName) throws java.lang.NoSuchFieldException
Gets the Category value of the specified field name for thisData.- Parameters:
ctxt- the current context in which this field's value is request.fieldName- the field name from which to retrieve the field value.- Returns:
- a TreeSet of
Categoryfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- Since:
- jcms-6.0.2, jcms-6.1.1
- See Also:
PortalPolicyFilter.getCategoryFieldValue(JcmsJspContext, String, Data, TreeSet)
-
getDisplayUrl
public java.lang.String getDisplayUrl(java.util.Locale locale)
Return the URL to access this data in the front office.
If descriptive URLs are enabled in JCMS (DescriptiveURLs) the url will be generated usingDescriptiveURLs.getDescriptiveURL(Data, Locale)otherwise, a standard "display.jsp?id=" URL is generated.
Warning: The return url may or may not contains a query string- Parameters:
locale- theLocaleto use for I18N and localized operations- Returns:
- a path relative to the webapp path, (no '/' at begining).
- Since:
- jcms-5.7.0
- See Also:
JcmsUtil.getDisplayUrl(Data, Locale)
-
getDisplayLink
public java.lang.String getDisplayLink(java.util.Locale locale)
Retrieve an HTML a tag suitable to display this Data- Parameters:
locale- the current Locale to use for I18N of the URL and other title information- Returns:
- an HTML fragment
- Since:
- jcms-7.1.0
-
getDisplayLink
public java.lang.String getDisplayLink(java.util.Locale locale, java.lang.String baseURL)Retrieve an HTML a tag suitable to display this Data- Parameters:
locale- the current Locale to use for I18N of the URL and other title informationbaseURL- optional baseURL to use in the URL *- Returns:
- an HTML fragment
- Since:
- jcms-8.0.0
-
getDisplayLink
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)Retrieve an HTML a tag suitable to display this Data- Parameters:
locale- the current Locale to use for I18N of the URL and other title informationbaseURL- optional baseURL to use in the URLparams- optional additionnal params to in the URL (egfoo=bar&zig=42)anchor- optional anchor to print in the URL (eg#foobartitle- the value to use in the title attribute (highly recommended, do not encode)css- optional 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- optional additionnal html attributes to use in the tag (must no be href, title and class)- Returns:
- an HTML fragment
- Since:
- jcms-7.1.0
-
updateDisplayLinkHtmlAttributes
public java.lang.StringBuilder updateDisplayLinkHtmlAttributes(java.lang.StringBuilder builder)
Returns a StringBuilder which contains html attributes, whom you can modify or replace in your subclasses- Parameters:
builder- theStringBuilder- Returns:
- a
StringBuilderwhich contains html attributes of display link - Since:
- jcms-10.0.3
-
updateDisplayLinkCss
public java.lang.StringBuilder updateDisplayLinkCss(java.lang.StringBuilder builder)
Returns a StringBuilder which contains css, whom you can modify or replace in your subclasses- Parameters:
builder- theStringBuilder- Returns:
- a
StringBuilderwhich contains css of display link - Since:
- jcms-10.0.3
-
updateDisplayLinkDataAttribute
public DataAttribute updateDisplayLinkDataAttribute(DataAttribute dataAttribute)
Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclasses- Parameters:
dataAttribute- theDataAttribute- Returns:
- a
DataAttributewhich contains data attributes of display link - Since:
- jcms-10.0.3
-
printDisplayLinkStart
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)Print opening tag <a... href attribute with URL and other attributes.- Parameters:
sb- the StringBuilder in which start of a tag will be appendedlocale- the user LocalebaseURL- optional baseURL to use in the URLparams- optional additionnal params to in the URL (egfoo=bar&zig=42)anchor- optional anchor to print in the URL (eg#foobartitle- 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- optional classname to use in the taghtmlAttributes- optional 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- optional 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.- Since:
- jcms-7.1.0 (was in LinkTag before)
-
printDisplayLinkStart
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, DataAttribute dataAttribute, 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.- Parameters:
sb- the StringBuilder in which start of a tag will be appendedlocale- the user LocalebaseURL- optional baseURL to use in the URLparams- optional additionnal params to in the URL (egfoo=bar&zig=42)anchor- optional anchor to print in the URL (eg#foobartitle- 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- optional classname to use in the taghtmlAttributes- optional additionnal html attributes to use in the tag (must no be href, title and class)dataAttribute- optional additionnal data attributes to use in the tagrequest- 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- optional 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.- Since:
- jcms-7.1.0 (was in LinkTag before)
-
getDisplayLinkHtmlAttributes
public java.lang.String getDisplayLinkHtmlAttributes()
- Returns:
- the html attributes for display link of current Data
- Since:
- jcms-10.0.3
-
getDisplayLinkCss
public java.lang.String getDisplayLinkCss()
- Returns:
- the css classes for display link of current Data
- Since:
- jcms-10.0.3
-
getDisplayLinkDataAttribute
public DataAttribute getDisplayLinkDataAttribute()
- Returns:
- the
DataAttributefor display link of current Data - Since:
- jcms-10.0.3
-
printDataName
public void printDataName(java.lang.StringBuilder sb, java.util.Locale locale, java.lang.String accessibilityInfo)Print the data name in the specified StringBuilder.- Parameters:
sb- the StringBuilderlocale- the user LocaleaccessibilityInfo- if "content" print accessibility info for FileDocument- Since:
- jcms-7.1.0 (was in LinkTag before)
-
printDisplayLinkEnd
public void printDisplayLinkEnd(java.lang.StringBuilder sb)
Print closing tag </a>.- Parameters:
sb- the StringBuilder- Since:
- jcms-7.1.0 (was in LinkTag before)
-
printDisplayUrl
public 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.- Parameters:
sb- the StringBuilderlocale- the user LocalebaseURL- optional baseURL to use in the URLparams- optional additionnal params to in the URL (egfoo=bar&zig=42)anchor- optional anchor to print in the URL (eg#foobar- Since:
- jcms-7.1.0 (was in LinkTag before)
-
printDisplayUrl
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)Prints URL using parameter of this tag.- Parameters:
sb- the StringBuilderlocale- the user LocalebaseURL- optional baseURL to use in the URLparams- optional additionnal params to in the URL (egfoo=bar&zig=42)anchor- optional anchor to print in the URL (eg#foobarrequest- 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- optional 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.- Since:
- jcms-7.1.0 (was in LinkTag before)
-
getDataIcon
public java.lang.String getDataIcon()
Returns source information for the icon associated to this Data, either a relative path or sprite classes name.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.- Either by specifying a relative image path :
types.Article.icon: images/jalios/icon/abstract.gif
- or else by using a sprite icon :
types.Article.icon: ss_sprite ss_date
- Returns:
- a relative path (eg
images/jalios/icon/abstract.gif) or sprite classes name (egss_sprite ss_date). - Since:
- jcms-8.0.0
- See Also:
getDataIconHtml(String)
- Either by specifying a relative image path :
-
getDataIconAlt
public 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.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
- Parameters:
lang- the user language- Returns:
- the alt Html attribute for the IMG Html tag, or empty string if non alternative text was define in property.
- Since:
- jcms-8.0.0
- See Also:
getDataIconHtml(String)
-
getDataIconTitle
public java.lang.String getDataIconTitle(java.lang.String lang)
Returns the icon's tooltip.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.- Parameters:
lang- the user language.- Returns:
- the title Html attribute for the IMG Html tag
- Since:
- jcms-8.0.0
- See Also:
getDataIconHtml(String)
-
getDataIconCSS
public java.lang.String getDataIconCSS()
Returns the CSS for the data icon.- Returns:
- the CSS for the data icon.
- Since:
- jcms-9.0.0
-
getDataIconHtml
public java.lang.String getDataIconHtml()
Returns the HTML code of the icon for this data in the current user language.This method uses value return by methods
getDataIcon(),getDataIconAlt(String)andgetDataIconTitle(String)to build an HTML IMG tag.- Returns:
- the HTML code of the icon for this data.
- Since:
- jcms-8.0.0
- See Also:
Channel.getCurrentUserLang(),getDataIcon(),getDataIconTitle(String),getDataIconAlt(String)
-
getDataIconHtml
public java.lang.String getDataIconHtml(java.lang.String lang)
Returns the HTML code of the icon for this data in the specified language.This method uses value returned by methods
getDataIcon(),getDataIconAlt(String)andgetDataIconTitle(String)to build an HTML IMG tag.- Parameters:
lang- the user language.- Returns:
- the HTML code of the icon for this data.
- Since:
- jcms-8.0.0
- See Also:
getDataIcon(),getDataIconTitle(String),getDataIconAlt(String)
-
getRowId
public java.lang.Long getRowId()
Returns the value of rowId (DBData ID).- Returns:
- the value of rowId (DBData ID).
- Since:
- jcms-6.0.0
-
setRowId
public void setRowId(java.lang.Long rowId)
Sets the value of rowId (DBData ID).- Parameters:
rowId- the rowId- Since:
- jcms-6.0.0
-
getAuthorId
public java.lang.String getAuthorId()
Returns the JStore ID of the author (only for DBData)- Returns:
- the JStore ID of the author (only for DBData)
- Since:
- jcms-6.0.0
-
setAuthorId
public void setAuthorId(java.lang.String authorId)
Sets the JStore ID of the author (only for DBData).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).- Parameters:
authorId- the JStore author id- Since:
- jcms-6.0.0
-
isDBData
public boolean isDBData()
Returns true if this objet is an instance of DBData.- Returns:
- true if this objet is an instance of DBData.
- Since:
- jcms-6.2.0
-
isInDatabase
public boolean isInDatabase()
Returns true if this data is stored in the database (false if it is stored in JStore).- Returns:
- true if this data is stored in the database (false if it is stored in JStore).
- Since:
- jcms-6.0.0
-
isPersisted
public boolean isPersisted()
Returns true if this data has been persisted (either in JStore or in the database).- Returns:
- true if this data has been persisted (either in JStore or in the database).
- Since:
- jcms-6.0.0
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceStorable- Overrides:
clonein classBasicStorable
-
mergeHybridLink
protected <T extends Data> T[] 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.- Type Parameters:
T- Any Data type- Parameters:
clazz- the class of the data contains in the returned array.storableArray- the array of storable datadbidArray- the array of DBID- Returns:
- the merge from the given array of storable with the given array of DBID.
- Since:
- jcms-6.1.0
-
mergeHybridLink
protected <T extends Data> java.util.Set<T> mergeHybridLink(java.lang.Class<T> clazz, java.util.Set<? extends Data> storableSet, java.util.Set<java.lang.String> dbidSet)
Returns the merge from the given set of storable with the given set of DBID.- Type Parameters:
T- Any Data type- Parameters:
clazz- the class of the data contains in the returned array.storableSet- the set of storabledbidSet- the set of DBID- Returns:
- the merge from the given set of storable with the given set of DBID.
- Since:
- jcms-10.0.1
-
computeDBIDArray
protected java.lang.String[] computeDBIDArray(Data[] dataArray)
Extract the DBData from the given array and return an array of identifier of those DBData. The given array is cleaned.- Parameters:
dataArray- the array to clean.- Returns:
- an array of DBID
- Since:
- jcms-6.1.0
-
cleanHybridCollection
protected void cleanHybridCollection(Data[] array)
-
computeDBIDSet
protected java.util.HashSet<java.lang.String> computeDBIDSet(java.util.Set<? extends Data> dataSet)
Extract and remove the DBData from the given set and return a set of identifier of those DBData. The given set is cleaned.- Parameters:
dataSet- the set to extract the DBData.- Returns:
- a set of DBID
- Since:
- jcms-10.0.1
-
cleanHybridCollection
protected void cleanHybridCollection(java.util.Set<? extends Data> set)
-
computeDBIDList
protected java.util.ArrayList<java.lang.String> computeDBIDList(java.util.List<? extends Data> dataList)
Extract and remove the DBData from the given list and return a list of identifier of those DBData. The given set is cleaned.- Parameters:
dataList- the list to extract the DBData.- Returns:
- a list of DBID
- Since:
- jcms-10.0.1
-
cleanHybridCollection
protected void cleanHybridCollection(java.util.List<? extends Data> list)
-
initializeDBDataCollections
public void initializeDBDataCollections()
This methods force the collections of the DBData to be initialized()- Since:
- jcms-6.2.0
-
-