Class Group
- All Implemented Interfaces:
AccessControlConstants,EditableData,JcmsConstants,ImportConstants,MashupConstants,Storable,JaliosConstants,LangPropertyArgument,Cloneable,Comparable<BasicStorable>
Group object is referenced by a set of Member instances.- Author:
- Olivier Dedieu
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGroup.AclComparator<T extends Group>DataComparator sorting groups using their ACL.static classGroup.DataRightComparator<T extends Group>This comparator sort groups according the DataRight they have.static classGroup.LastLdapSyncComparator<T extends Group>static classSelect LDAP groups.static classSelect leaf groups.static classGroup.MemberCountComparator<T extends Group>static classSelect groups the given member can read.static classGroup.NameComparator<T extends Group>static classSelect groups by their name.static classSelect groups that have at least one NotificationCriteria for which the period is equal to the period of the period given to the constructor.static classGroup.OrderComparator<T extends Group>static classSelect groups of the organization.static classstatic classGroup.PreferredWorkspaceComparator<T extends Group>static classSelect groups which have at least one profiling category.static classSelect groups of with given visibility.static classGroup.WorkspaceComparator<T extends Group>static classDataSelector selecting Groups based on their Workspace.Nested classes/interfaces inherited from class com.jalios.jcms.Data
Data.AuthorComparator<T extends Data>, Data.AuthorizedSelector, Data.AuthorSelector, Data.CdateSelector, Data.DataNameComparator<T extends Data>, Data.DeletableSelector, Data.ImportSelector, Data.MdateSelector, Data.OpAuthorComparator<T extends Data>, Data.RowIdComparator<T extends Data>, Data.StrongLockSelectorNested 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
FieldsModifier and TypeFieldDescriptionprotected AccessControlListprotected MemberDeprecated.protected StringDeprecated.protected intprotected intprotected Memberprotected Stringprotected Stringprotected Dateprotected Stringprotected booleanprotected Stringprotected Notificationprotected intprotected PortalInterfaceprotected Stringprotected intprotected intstatic final intstatic final intstatic final intprotected WorkspaceFields inherited from class com.jalios.jcms.Data
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extraDataMap, extraDBDataMapToSaveOnOp, importMap, opAuthor, opDelegate, WRITE_IN_PROGRESS_EXTRA_INFO, WYSIWYG_INLINE_EDIT_REQUEST_PARAMETERFields inherited from class com.jalios.jstore.BasicStorable
cdate, ddate, id, isStoreCache, mdate, storeFields inherited from interface com.jalios.jcms.accesscontrol.AccessControlConstants
ADMIN_RESOURCE, CTXT_DATA, CTXT_WORKSPACE, DBMBR_EDIT_RESOURCE, GRP_EDIT_RESOURCE, MBR_EDIT_RESOURCE, WORKSPACE_ADMIN_RESOURCE, WS_EDIT_RESOURCE, WSGRP_EDIT_RESOURCE, WSMBR_EDIT_RESOURCEFields 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_PROPFields 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_YEARFields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, 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, GENERATIONAL_STORE_DIRECTORY, 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, PHOTO_XLARGE, PHOTO_XLARGE_HEIGHT, PHOTO_XLARGE_PROP_PREFIX, PHOTO_XLARGE_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_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, SVGSPRITE_ICON_PREFIX, TEMPLATE_TAB, THEME_DIR, 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, TYPES_UNKNOWN_CLASS_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_XMLFields inherited from interface com.jalios.jcms.mashup.MashupConstants
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given group to the parent set of this group.Retrieve the first WKRole instance this groups belongs to.booleanbelongsToRole(WKRole role) Checks if this group is defined in the specified WKRole.final booleancanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo) Checks if the specified member is authorized to read this Group.booleancanDeleteOther(Class<? extends Publication> clazz) Check if this group can delete object of the given class.booleanbooleancanPublish(Class<? extends Publication> clazz) Check if this group can publish object of the given class.booleancanReceiveMail(boolean checkDisable) Checks if at least one member of the group can receive a valid email.booleancanReceiveMail(boolean checkDisable, boolean notUsed) Deprecated.booleancanUpdateOther(Class<? extends Publication> clazz) Check if this group can update object of the given class.checkDelete(Member mbr, Map context) Checks if the deletion can be performedChecks whether or not data integrity constraints are respected.checkMember(int op, Member mbr, Map context) Checks if the given member can perform the given operation.checkWrite(int op, Member mbr, boolean checkIntegrity, Map context) Checks if the given write operation can be performedprotected voidThis method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.voidexportXmlField(StringBuffer sb, int indentLevel) Fills the given StringBuffer with Xml export of fields of this data.protected voidexportXmlRelated(StringBuffer sb, String related, int indentLevel) voidFill the given string buffer with specific attributes of this data.Gets the AccessControlList of this group.static <T extends Group>
Comparator<T> Retrieve a new instance of Group comparator sorting groups according their ACL.intgetAncestorSet(boolean includeMyself) Returns the ancestors of this group.Deprecated.getAssistant(boolean queryDB) Deprecated.Deprecated.getAssistantSet(boolean queryDB) Return the set of groups which have this group has parent.static Comparator<Group> getComparator(String str, boolean reverse) Deprecated.intReturn the cookie maximum age value of this group (in seconds).intReturns the cookie max-age value to use for this group.
I.E.static StringgetCSVHeader(String lang) Returns the CSV header of this objectReturns source information for the icon associated to this Data, either a relative path or sprite classes name.getDataName(String language) Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.intReturns the manager of this group.getDeclaredManager(boolean queryDB) Returns the manager of this group.Returns a JCMS ID of the manager if it is persisted in the DB.Retrieves Set of members who belongs to this group ONLY.Returns the descendant groups of this group.Get the description of this group.getDisplayUrl(Locale locale) Return the URL to access this data in the front office.Returns a set of all Groups set which are globalgetIcon()Return the img tag for the iconstatic <T extends Group>
Comparator<T> booleanReturns the manager of this group (it can be either the declared manager or the nearest manager of a parent group)static <T extends Group>
Comparator<T> Retrieves Set of members (Store only) who belongs to this group (or to any child group of this group).getMemberSet(boolean searchInDB) Retrieves Set of members (DBMember or Member) who belongs to this group (or to any child group of this group).getName()Get the value of name.Get the value of name bound to the given language.Get the value of name bound to the given language.static <T extends Group>
Comparator<T> static <T extends Group>
Comparator<T> getNameComparator(String lang) Get the value of nameML.Retrieves the notifications defined for members of this group.intgetOrder()Get the order value of this group.
The order value may be used to sort severals groups in a set.static <T extends Group>
Comparator<T> Get the parent groups of this groups in a Set.Retrieves the Categories that members of this groups are defined with, for profiling purposes.Retrieves a new set which contains the publications of all the members of this group.
Performance Warning: this method creates and fill a new Set each time it is invoked.Retrieve the DataRight associated with the specified class for this group.Retrieves the map associating DataRight instance to the publication type (class name) on which they must applied.Returns the groups without parent in the given workspace.Returns the teamPortal bound to this group.intReturns the number of type referencing this group (through "authgroups" field).Retrieves the Categories that members of this groups are allowed to use when publishing.intRetrieves the Workspace defined for this group.static <T extends Group>
Comparator<T> Returns a set of WSTypeEntry referencing this group.booleanChecks if this group has at least one children.booleanReturns true if this group is attached to 2 or more parent groups.protected booleanbooleanisAncestor(Group group) Returns true if given group is an ancestor of this group or is the same object as this group.booleanisAssistedBy(Member mbr) Returns true if the given member is the assistant of this group.booleanisDescendant(Group group) Returns true if the given group is a descendant of this group.booleanChecks if this group is a global group or not.booleanbooleanisManagedBy(Member mbr) Returns true if the given member is the manager of this group.booleanReturns true if this group belongs to at least one parent group.voidperformDelete(Member mbr, Map context) Performs data deletionvoidRefresh type referrer count.voidremoveParent(Group group) Removes the given group form the parent set of this group.voidSets the AccessControlList of this group.voidDeprecated.voidDeprecated.voidsetAssistantSet(TreeSet<Member> memberSet) voidvoidsetCookieMaxAge(int cookieMaxAge) Set the cookie maximum age value to use for member of this group (in seconds).
Default is 0.voidSets the manager of this group.voidSets the managerDBID of this group.voidsetDescription(String desc) Set the description of this group.voidsetLastLdapSynchro(Date date) Set last LDAP synchronization Date (thus making it an LDAP group).voidSet the distinguish name of this group.voidsetLdapSync(boolean ldapSync) Set if this group should be synchronized with ldap or not.voidSet the value of name.voidConvenient method to set the value of the Name field in any language (default site language or any other).
This method will set the proper field value (setName(String)orsetNameML(HashMap)) depending on the specified language.voidSet the value of nameML.voidsetNotification(Notification notification) Set the notifications to use for members of this group.voidsetOrder(int order) Set the order of this group.
The order value may be used to sort severals groups in a set.voidsetParentSet(HashSet<Group> parentSet) Set the parent groups of this group.
This method will removes any cycle dependencies or null reference the specified Set may contains.voidsetProfilingCategorySet(Set<Category> profilingCategorySet) Set the categories that members of this groups are defined with, for profiling purposes.voidsetRightFromClassMap(HashMap<String, DataRight> rightFromClassMap) Set the map associating DataRight instance to the publication type (class name) on which they must be applied.
For example, here is a map giving full access to WebPages an none to Articles :voidsetTeamPortal(PortalInterface teamPortal) Set the teamPortal bound this group.voidsetUseCategorySet(TreeSet<Category> useCategorySet) Set the Categories that members of this groups are allowed to use when publishing.voidsetVisibility(int v) Sets the visibilityvoidsetWorkspace(Workspace workspace) Sets the Workspace of this group.protected voidsplitHybridCollections(Data previousData) This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.Returns a CSV view of this objecttoString()voidupdateAuthGroupPublication(Publication pub, boolean add) Update the index of publication targeting this group in their authorized Groups.
You do NOT need to call this method which is used internally to update the index.voidupdateMemberSet(Member mbr, boolean add) Update the memberSet index.
You do NOT need to call this method which is used internally to update the memberSet.voidupdateMemberSet(Set<Member> mbrSet, boolean add) Update the memberSet index.
You do NOT need to call this method which is used internally to update the memberSet.Methods inherited from class com.jalios.jcms.Data
canBeReadBy, canBeUnlockedBy, canRequestUnlock, checkAndPerformCreate, checkAndPerformCreate, checkAndPerformDelete, checkAndPerformDelete, checkAndPerformUpdate, checkAndPerformUpdate, checkCreate, checkCreate, checkDelete, checkIntegrity, checkLockMember, checkStrongLockMember, checkStrongLockMember, checkUpdate, checkUpdate, cleanHybridCollection, cleanHybridCollection, cleanHybridCollection, clone, computeDBIDArray, computeDBIDList, computeDBIDSet, exportXml, exportXml, exportXml, exportXml, exportXmlRelated, getAllReferrerSet, getAllReferrerSet, getAllRelatedData, getAllTypeFieldEntry, getAuthor, getAuthor, getAuthorComparator, getAuthorDBID, getAuthorId, getAuthorSelector, getBooleanFieldValue, getBooleanFieldValue, getCaddyComparator, getCategoryFieldValue, getCategoryFieldValue, getCdateSelector, getDataIconAlt, getDataIconCSS, getDataIconHtml, getDataIconHtml, getDataIconTitle, getDataImage, getDataImage, getDataImage, getDataNameComparator, getDate, getDate, getDateSelector, getDefaultFieldStatus, getDeletableSelector, getDisplayLink, getDisplayLink, getDisplayLink, getDisplayLink, getDisplayLinkCss, getDisplayLinkDataAttribute, getDisplayLinkHtmlAttributes, getDoubleFieldValue, getDoubleFieldValue, getExportXmlDataValue, getExtraData, getExtraDataMap, getExtraDBData, getExtraDBDataMap, getExtraInfo, getExtraInfoMap, getFieldStatusMap, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getGenericThumbnail, getGenericThumbnail, getImportAuthor, getImportBatch, getImportDate, getImportDisplayUrl, getImportId, getImportMap, getImportMdate, getImportSelector, getImportSignature, getImportSource, getImportSourceUrl, getImportUrl, getIntFieldValue, getIntFieldValue, getLangPropertyValue, getLinkCount, getLinkIndexedDataSet, getLinkIndexedDataSet, getLockDate, getLockInfo, getLockMember, getLongFieldValue, getLongFieldValue, getMdateSelector, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getOpAuthor, getOpAuthorComparator, getOpAuthorId, getOpDelegate, getReadAuthorizedSelector, getReferrerSet, getRowId, getRowIdComparator, getStrongLock, getStrongLockContext, getStrongLockContextData, getStrongLockDate, getStrongLockInfo, getStrongLockMember, getStrongLockSelector, getTypeEntry, getTypeFieldsEntries, getUpdateInstance, getVirtualIDSet, importXml, importXmlFieldsWithReferences, importXmlFiles, importXmlReferences, initializeDBDataCollections, isDBData, isImported, isImportUpdated, isInDatabase, isLocked, isPersisted, isStrongLocked, lock, markNewImport, mergeHybridLink, mergeHybridLink, performAfterWrite, performBeforeWrite, performCreate, performCreate, performDelete, performUpdate, performUpdate, prepareUpdateContext, printDataName, printDisplayLinkEnd, printDisplayLinkStart, printDisplayLinkStart, printDisplayUrl, printDisplayUrl, putStrongLock, putStrongLock, releaseStrongLock, releaseStrongLock, removeAllRelatedData, removeAllRelatedData, removeExtraData, removeExtraDBData, removeExtraInfo, setAuthor, setAuthorDBID, setAuthorId, setBooleanFieldValue, setCategoryFieldValue, setDoubleFieldValue, setExtraData, setExtraDataMap, setExtraDBData, setExtraDBDataMap, setExtraDBDataMap, setExtraInfo, setFieldValue, setFieldValue, setImportAuthor, setImportBatch, setImportDate, setImportDisplayUrl, setImportId, setImportMap, setImportMdate, setImportSignature, setImportSource, setImportSourceUrl, setImportUpdated, setIntFieldValue, setLongFieldValue, setMdate, setOpAuthor, setOpAuthorId, setOpDelegate, setRowId, toFullString, unlock, unlock, unmarkNewImport, updateDisplayLinkCss, updateDisplayLinkDataAttribute, updateDisplayLinkHtmlAttributes, updateExtraDataMap, updateExtraDBDataMap, updateIndexTreeSetMethods 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 Details
-
VISIBILITY_DEFAULT
public static final int VISIBILITY_DEFAULT- See Also:
-
VISIBILITY_MEMBERS
public static final int VISIBILITY_MEMBERS- See Also:
-
VISIBILITY_ADMINS
public static final int VISIBILITY_ADMINS- See Also:
-
name
-
nameML
-
description
-
order
protected int order -
rightFromClassMap
-
cookieMaxAge
protected int cookieMaxAge -
useCategorySet
-
workspace
-
notification
-
parentSet
-
accessControlList
-
visibility
protected int visibility -
declaredManager
-
declaredManagerDBID
-
assistant
Deprecated. -
assistantDBID
Deprecated. -
assistantSet
-
assistantSetDBID
-
teamPortal
-
ldapDN
-
ldapSync
protected boolean ldapSync -
lastLdapSynchro
-
profilingCategorySet
-
cookieMaxAgeResolved
protected transient int cookieMaxAgeResolved -
typeReferrerCount
protected transient int typeReferrerCount -
typeReferrer
-
-
Constructor Details
-
Group
public Group() -
Group
-
-
Method Details
-
canEditCategories
public boolean canEditCategories() -
getRight
Retrieve the DataRight associated with the specified class for this group.- Parameters:
clazz- the publication type of which to find the DataRight- Returns:
- the DataRight associated with the given class or null if no right has been specified.
-
toString
-
canBeReadBy
Checks if the specified member is authorized to read this Group.This method is the implementation of Data read right control for Group.
Current implementation delegates to canBeReadBy(member, true, true).
- Overrides:
canBeReadByin classData- 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 Group, false otherwise
- Since:
- jcms-10.0.0
-
internalCanBeReadBy
-
getCookieMaxAgeResolved
public int getCookieMaxAgeResolved()Returns the cookie max-age value to use for this group.
I.E. if cookieMaxAge value of this group has not been defined (== 0) then the value of the "cookie.max-age" property is returned, otherwise the cookieMaxAge value of this group is returned.- Returns:
- the cookie max-age value to use for this group in seconds.
- Since:
- jcms-5.0.0
-
toCSV
Returns a CSV view of this object -
getCSVHeader
Returns the CSV header of this object- Parameters:
lang- the output language- Returns:
- the CSV header of this object
- Since:
- jcms-5.0.0
-
fillExportXmlFieldAttributes
Fill the given string buffer with specific attributes of this data.- Overrides:
fillExportXmlFieldAttributesin classData- Parameters:
sb- the StringBuffer- Since:
- jcms-5.7.1
- See Also:
-
exportXmlField
Description copied from class:DataFills the given StringBuffer with Xml export of fields of this data.- Overrides:
exportXmlFieldin classData- Parameters:
sb- the StringBufferindentLevel- the indent level
-
exportXmlRelated
- Overrides:
exportXmlRelatedin classData
-
getDisplayUrl
Description copied from class:DataReturn 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- Overrides:
getDisplayUrlin classData- Parameters:
locale- theLocaleto use for I18N and localized operations- Returns:
- a path relative to the webapp path, (no '/' at begining).
- See Also:
-
canPublish
Check if this group can publish object of the given class.- Parameters:
clazz- the class- Returns:
- true if this group can publish object of the given class.
- Since:
- jcms-3.0
-
canUpdateOther
Check if this group can update object of the given class.- Parameters:
clazz- the class- Returns:
- true if this group can update object of the given class.
- Since:
- jcms-3.0
-
canDeleteOther
Check if this group can delete object of the given class.- Parameters:
clazz- the class- Returns:
- true if this group can delete object of the given class.
- Since:
- jcms-3.0
-
checkWrite
Checks if the given write operation can be performed- Overrides:
checkWritein classData- 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.7.3
-
belongsToRole
Retrieve the first WKRole instance this groups belongs to.- Returns:
- the first WKRole the member belongs to, or null if no WKRole is associated with this group.
- Since:
- jcms-4.1
-
belongsToRole
Checks if this group is defined in the specified WKRole.- Parameters:
role- a WKRole (can be null)- Returns:
- true if member belongs to the WKRole, false otherwise and when specified role is null
- Since:
- jcms-4.1
-
canReceiveMail
Deprecated.since jcms-6.0.2 seecanReceiveMail(boolean), will be removed for jcms-6.1Checks if at least one member of the group can receive a valid email.- Parameters:
checkDisable- check the disable account propertynotUsed- NOT USED ANYMORE- Returns:
- true if one member's email is valid
- Since:
- jcms-5.0.0
-
canReceiveMail
public boolean canReceiveMail(boolean checkDisable) Checks if at least one member of the group can receive a valid email.- Parameters:
checkDisable- check the disable account property- Returns:
- true if one member's email is valid
- Since:
- jcms-6.0.2
-
isGlobalGroup
public boolean isGlobalGroup()Checks if this group is a global group or not.- Returns:
- true if this is global group (workspace == null), false otherwise
- Since:
- jcms-5.5.0
-
getChildrenSet
Return the set of groups which have this group has parent.- Returns:
- a set of Group, never return null.
- Since:
- jcms-5.6.0
-
hasChildren
public boolean hasChildren()Checks if this group has at least one children.- Returns:
- true if this group has at least one children.
- Since:
- jcms-5.6.0
-
isSubGroup
public boolean isSubGroup()Returns true if this group belongs to at least one parent group.- Returns:
- true if this group belongs to at least one parent group.
- Since:
- jcms-5.6.0
-
hasMultipleParent
public boolean hasMultipleParent()Returns true if this group is attached to 2 or more parent groups.- Returns:
- true if this group is attached to 2 or more parent groups.
- Since:
- jcms-5.6.0
-
addParent
Adds the given group to the parent set of this group.To invoke this method on an update instance of a Group, make sure you clone the
parentSetprior to invocation :Group groupUpdated = (Group) group.getUpdateInstance(); if (group.getParentSet() != null) { groupUpdated.setParentSet(new HashSet<Group>(group.getParentSet())); } groupUpdated.addParent(...); groupUpdated.performUpdate(admin);- Parameters:
group- to be added.- Since:
- jcms-5.6.0
-
removeParent
Removes the given group form the parent set of this group.To invoke this method on an update instance of a Group, make sure you clone the
parentSetprior to invocation :Group groupUpdated = (Group) group.getUpdateInstance(); if (group.getParentSet() != null) { groupUpdated.setParentSet(new HashSet<Group>(group.getParentSet())); } groupUpdated.removeParent(...); groupUpdated.performUpdate(admin);- Parameters:
group- to be removed.- Since:
- jcms-5.6.0
-
isDescendant
Returns true if the given group is a descendant of this group.- Parameters:
group- the group- Returns:
- true if the given group is a descendant of this group.
- Since:
- jcms-5.6.0
-
getDescendantSet
Returns the descendant groups of this group.- Returns:
- the descendant groups of this group.
- Since:
- jcms-5.6.0
-
isAncestor
Returns true if given group is an ancestor of this group or is the same object as this group.- Parameters:
group- the group to be checked.- Returns:
- true if given group is an ancestor of this group or is the same object as this group.
- Since:
- jcms-5.6.0
- See Also:
-
getAncestorSet
Returns the ancestors of this group.- Parameters:
includeMyself- if true, the ancestor set contains this group.- Returns:
- the ancestors of this group.
- Since:
- jcms-5.6.0
-
getDataIcon
Description copied from class:DataReturns 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
- Overrides:
getDataIconin classData- Returns:
- a relative path (eg
images/jalios/icon/abstract.gif) or sprite classes name (egss_sprite ss_date). - See Also:
- Either by specifying a relative image path :
-
getIcon
- Returns:
- String the image path for the icon
- Since:
- jcms-5.0.0
-
getIcon
Return the img tag for the icon- Parameters:
userLang- the icon languageimgTag- boolean indicate to return an <img> tag- Returns:
- the img tag for the icon
- Since:
- jcms-5.0.0
-
getDataName
Description copied from class:DataReturn 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.- Overrides:
getDataNamein classData- Parameters:
language- the language in which to return the name if multilang available for the data.- Returns:
- name of Group or empty String if not specified.
- Since:
- jcms-5.1
- See Also:
-
getName
Get the value of name bound to the given language.- Parameters:
lang- the language to get the name- Returns:
- name in the given language.
- Since:
- jcms-7.0.0
-
getName
Get the value of name bound to the given language.- Parameters:
lang- the language to get the nameuseDefault- should main language used as default language if name does not exist in the given language- Returns:
- name in the given language.
- Since:
- jcms-7.0.0
-
getName
Get the value of name.- Returns:
- Value of name.
-
setName
Set the value of name.- Parameters:
v- Value to assign to v.
-
getNameML
Get the value of nameML.- Returns:
- Value of nameML.
- Since:
- jcms-7.0.0
-
setNameML
Set the value of nameML.- Parameters:
v- Value to assign to nameML.- Since:
- jcms-7.0.0
-
setName
Convenient method to set the value of the Name field in any language (default site language or any other).
This method will set the proper field value (setName(String)orsetNameML(HashMap)) depending on the specified language.- Parameters:
lang- the language (ISO 639 code) in which to set the valuevalue- the value to set.- Since:
- jcms-7.0.0
- See Also:
-
getDescription
Get the description of this group.- Returns:
- a string value, never return null.
- Since:
- jcms-9.0.1 -- JCMS-4405
-
setDescription
Set the description of this group.- Parameters:
desc- the description to set- Since:
- jcms-9.0.1 -- JCMS-4405
-
getOrder
public int getOrder()Get the order value of this group.
The order value may be used to sort severals groups in a set.- Returns:
- the order defined for this group.
-
setOrder
public void setOrder(int order) Set the order of this group.
The order value may be used to sort severals groups in a set.- Parameters:
order- an integer.
-
getWorkspace
Retrieves the Workspace defined for this group.- Returns:
- the workspace of this group, may be null for global groups.
-
setWorkspace
Sets the Workspace of this group.- Parameters:
workspace- the Workspace to define for this group. If null, this group will be a global group.
-
getCookieMaxAge
public int getCookieMaxAge()Return the cookie maximum age value of this group (in seconds).- Returns:
- the cookie max-age value in seconds.
- Since:
- jcms-2.1
-
setCookieMaxAge
public void setCookieMaxAge(int cookieMaxAge) Set the cookie maximum age value to use for member of this group (in seconds).
Default is 0. When set to 0, the default value specified by the property "cookie.max-age" will be used bygetCookieMaxAgeResolved().- Parameters:
cookieMaxAge- a duration in seconds indicating the time of validity of the cookie- Since:
- jcms-2.1
-
getVisibility
public int getVisibility()- Returns:
- the visibility
- Since:
- jcms-7.1.0
-
setVisibility
public void setVisibility(int v) Sets the visibility- Parameters:
v- the visibility- Since:
- jcms-7.1.0
-
getRightFromClassMap
Retrieves the map associating DataRight instance to the publication type (class name) on which they must applied.- Returns:
- a HashMap with class names for keys (String) and DataRight instances for values, can return null if rights have not been defined for this group.
-
setRightFromClassMap
Set the map associating DataRight instance to the publication type (class name) on which they must be applied.
For example, here is a map giving full access to WebPages an none to Articles :HashMap rightMap = new HashMap(); DataRight fullRight = channel.getDataRight(true, true, true, true); DataRight noRight = channel.getDataRight(false, false, false, true); rightMap.put(WebPage.class.getName(), fullRight); rightMap.put(Article.class.getName(), noRight); group.setRightFromClassMap(rightMap);
- Parameters:
rightFromClassMap- a HashMap with class names for keys (String) and DataRight instances for values.
-
getParentSet
Get the parent groups of this groups in a Set.- Returns:
- a HashSet of Group (maybe null or empty).
- Since:
- jcms-5.6.0
-
setParentSet
Set the parent groups of this group.
This method will removes any cycle dependencies or null reference the specified Set may contains.- Parameters:
parentSet- HashSet of Group, can be null or empty.- Since:
- jcms-5.6.0
-
getMemberSet
Retrieves Set of members (Store only) who belongs to this group (or to any child group of this group).- Returns:
- a internal (transient index) Set of Member, do not modify the content of the returned value. Never return null.
-
getMemberSet
Retrieves Set of members (DBMember or Member) who belongs to this group (or to any child group of this group).Performance warning : requesting all DBMember of a group (and subgroup) might be a very expensive operation for group with large number of members. DO NOT use this method in UI where you can provide paginated results, see
DBMemberQueryHandlerorAllMemberQueryHandler.- Parameters:
searchInDB- if true extends search to the DBMember (see performance warning!)- Returns:
- a Set of members. Internal index might be returned, do not modify the content of the returned value. Never return null.
- Since:
- jcms-10.0.6
-
getDBMemberCount
public int getDBMemberCount()- Returns:
- the count of DBMember in current Group and its children
- Since:
- jcms-7.1.2
-
getAllMemberCount
public int getAllMemberCount() -
getDeclaredMemberSet
Retrieves Set of members who belongs to this group ONLY.- Returns:
- a internal (transient index) Set of Member, do not modify the content of the returned value.
-
updateMemberSet
Update the memberSet index.
You do NOT need to call this method which is used internally to update the memberSet.- Parameters:
mbr- the member to be added or removedadd- add if true, remove if false- Since:
- jcms-5.0.1
-
updateAuthGroupPublication
Update the index of publication targeting this group in their authorized Groups.
You do NOT need to call this method which is used internally to update the index.- Parameters:
pub- the publication to be added or removedadd- add if true, remove if false- Since:
- jcms-9.0.5 jcms-10.0.2 JCMS-6305
-
updateMemberSet
Update the memberSet index.
You do NOT need to call this method which is used internally to update the memberSet.- Parameters:
mbrSet- the members to be added or removedadd- add if true, remove if false- Since:
- jcms-9.0.5 JCMS-5821
-
getUseCategorySet
Retrieves the Categories that members of this groups are allowed to use when publishing.- Returns:
- a TreeSet of Category, never return null.
- Since:
- jcms-4.0
-
setUseCategorySet
Set the Categories that members of this groups are allowed to use when publishing.- Parameters:
useCategorySet- a TreeSet of Category, if null, an empty TreeSet will be defined.- Since:
- jcms-4.0
-
getPublicationSet
Retrieves a new set which contains the publications of all the members of this group.
Performance Warning: this method creates and fill a new Set each time it is invoked.- Returns:
- a new Set of Publications
- Since:
- jcms-3.0
-
getNotification
Retrieves the notifications defined for members of this group.- Returns:
- the Notification object of this Group which defines the notifications to apply for its members.
-
setNotification
Set the notifications to use for members of this group.- Parameters:
notification- Notification object defining the notifications queries and criteria.
-
getOrderComparator
-
getNameComparator
-
getNameComparator
-
getMemberCountComparator
-
getWorkspaceComparator
-
getLastLdapSyncComparator
-
getAclComparator
Retrieve a new instance of Group comparator sorting groups according their ACL.- Type Parameters:
T- Group class- Returns:
- a new instance of Comparator
- Since:
- jcms-7.0.0
-
getComparator
Deprecated.Retrieves a newComparatorgiven a name representing it. The returned comparator can be used to sort anyCollectioncontainingGroups.
You can specify any of the following value:"name":getNameComparator()"order":getOrderComparator()"size":getMemberCountComparator()"workspace":getWorkspaceComparator()"lastLdapSync":getLastLdapSyncComparator()"acl":getAclComparator()
And also any of the value available throughData.getComparator(String, boolean)- 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. - See Also:
-
getGlobalGroupSet
Returns a set of all Groups set which are global- Returns:
- the global group set
- Since:
- jcms-5.5.0
- See Also:
-
checkIntegrity
Checks whether or not data integrity constraints are respected.- Overrides:
checkIntegrityin classData- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkMember
Checks if the given member can perform the given operation.- Overrides:
checkMemberin classData- 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
-
checkDelete
Checks if the deletion can be performed- Overrides:
checkDeletein classData- 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
-
getTypeReferrerCount
public int getTypeReferrerCount()Returns the number of type referencing this group (through "authgroups" field).- Returns:
- the number of type referencing this group.
- Since:
- jcms-5.5.0
-
refreshTypeReferrerCount
public void refreshTypeReferrerCount()Refresh type referrer count.- Since:
- jcms-5.5.0
-
getWSTypeEntryReferrerSet
Returns a set of WSTypeEntry referencing this group.- Returns:
- a set of WSTypeEntry referencing this group.
- Since:
- jcms-5.5.0
-
performDelete
Performs data deletion- Overrides:
performDeletein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
getRootGroupSet
Returns the groups without parent in the given workspace. If the workspace is null, return the global groups without parent.- Parameters:
ws- the workspace.- Returns:
- the groups without parent.
- Since:
- jcms-5.6.0
-
isLdapGroup
public boolean isLdapGroup()- Returns:
- true if this group is an LDAP group (if it has been
synchronized with the LDAP, i.e., if
getLastLdapSynchro()is not null ANDgetLdapDN()is not empty). Warning: this method won't return true if the LdapDN has been set but not the last ldap synchro date. - Since:
- jcms-5.7.0
-
getLastLdapSynchro
- Returns:
- the Date when the last LDAP synchronization occured, or null if this group is not an LDAP group.
- Since:
- jcms-5.7.0
-
setLastLdapSynchro
Set last LDAP synchronization Date (thus making it an LDAP group).- Parameters:
date- the last LDAP synchronization Date (may be null)- Since:
- jcms-5.7.0
-
getLdapDN
- Returns:
- the distinguish name of this group.
- Since:
- jcms-5.7.0
-
setLdapDN
Set the distinguish name of this group.- Parameters:
ldapDN- the distinguish name to set, e.g."cn=Marketing,ou=Groups,dc=company,dc=com", (may be null).- Since:
- jcms-5.7.0
-
getLdapSync
public boolean getLdapSync()- Returns:
- true if this group is allowed to be synchronized with ldap.
- Since:
- jcms-5.7.0
-
setLdapSync
public void setLdapSync(boolean ldapSync) Set if this group should be synchronized with ldap or not.- Parameters:
ldapSync-trueif LDAP synchronization of this group should be performed if needed,falseotherwise.- Since:
- jcms-5.7.0
-
getAccessControlList
Gets the AccessControlList of this group.- Returns:
- the AccessControlList of this Group or null if none was defined
- Since:
- jcms-7.0
-
setAccessControlList
Sets the AccessControlList of this group.- Parameters:
acl- the AccessControlList to use for this Group, can be null- Since:
- jcms-7.0
-
getDeclaredManager
Returns the manager of this group. If the manager 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 manager 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 getDeclaredManager(false).- Returns:
- the manager of this group.
- Since:
- jcms-10.0.0
- See Also:
-
getDeclaredManager
Returns the manager of this group. If queryDB is true query the DB to find the manager from managerDBID.- Parameters:
queryDB- indicates if the database must be queried.- Returns:
- the manager of this group.
- Since:
- jcms-10.0.0
-
setDeclaredManager
Sets the manager of this group.- Parameters:
v- the manager- Since:
- jcms-10.0.0
-
getDeclaredManagerDBID
Returns a JCMS ID of the manager if it is persisted in the DB.- Returns:
- a JCMS ID.
- Since:
- jcms-10.0.0
-
setDeclaredManagerDBID
Sets the managerDBID of this group.- Parameters:
v- the managerDBID- Since:
- jcms-10.0.0
-
isManagedBy
Returns true if the given member is the manager of this group.- Parameters:
mbr- the member- Returns:
- true if the given member is the manager of this group.
- Since:
- jcms-10.0.0
-
getManager
Returns the manager of this group (it can be either the declared manager or the nearest manager of a parent group)- Returns:
- the manager of this group
- Since:
- jcms-10.0.0
-
getAssistant
Deprecated.Returns the assistant of this group. If the assistant 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 assistant 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 getAssistant(false).- Returns:
- the assistant of this group.
- Since:
- jcms-10.0.6
- See Also:
-
getAssistant
Deprecated.Returns the assistant of this group. If queryDB is true query the DB to find the assistant from assistantDBID.- Parameters:
queryDB- indicates if the database must be queried.- Returns:
- the assistant of this group
- Since:
- jcms-10.0.6
-
setAssistant
Deprecated.Sets the assistant of this group.- Parameters:
v- the assistant- Since:
- jcms-10.0.6
-
getAssistantDBID
Deprecated.Returns a JCMS ID of the assistant if it is persisted in the DB.- Returns:
- a JCMS ID.
- Since:
- jcms-10.0.6
-
setAssistantDBID
Deprecated.Sets the assistantDBID of this group.- Parameters:
v- the assistantDBID- Since:
- jcms-10.0.6
-
getAssistantSet
- Returns:
- the set of assistants of this group
- Since:
- jcms-10.0.7 JCMS-9897
-
getAssistantSet
- Parameters:
queryDB- true to search in DBMember- Returns:
- the set of assistants of this group
- Since:
- jcms-10.0.7 JCMS-9897
-
setAssistantSet
- Parameters:
memberSet- the set of assistants of this group- Since:
- jcms-10.0.7 JCMS-9897
-
splitHybridCollections
Description copied from class:DataThis method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Overrides:
splitHybridCollectionsin classData- Parameters:
previousData- the previous data (provided for update only)- Since:
- jcms-10.0.7 JCMS-9897
-
cleanHybridCollections
protected void cleanHybridCollections()Description copied from class:DataThis method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Overrides:
cleanHybridCollectionsin classData- Since:
- jcms-10.0.7 JCMS-9897
-
getAssistantSetDBID
- Returns:
- ID set of DB assistants
- Since:
- jcms-10.0.7 JCMS-9897
-
setAssistantSetDBID
- Parameters:
v- ID set of DB assistants- Since:
- jcms-10.0.7 JCMS-9897
-
isAssistedBy
Returns true if the given member is the assistant of this group.- Parameters:
mbr- the member- Returns:
- true if the given member is the assistant of this group.
- Since:
- jcms-10.0.6
-
getTeamPortal
Returns the teamPortal bound to this group.- Returns:
- the teamPortal bound to this group.
- Since:
- jcms-10.0.0
-
setTeamPortal
Set the teamPortal bound this group.- Parameters:
teamPortal- the portal- Since:
- jcms-10.0.0
-
getProfilingCategorySet
Retrieves the Categories that members of this groups are defined with, for profiling purposes.- Returns:
- a Set of Category, never return null.
- Since:
- jcms-10.0.9 / JCMS-11117
-
setProfilingCategorySet
Set the categories that members of this groups are defined with, for profiling purposes.- Parameters:
profilingCategorySet- a Set of Category, if null, an empty TreeSet will be defined.- Since:
- jcms-10.0.9 / JCMS-11117
-
canReceiveMail(boolean), will be removed for jcms-6.1