public class Group extends Data implements EditableData, AccessControlConstants
Group
object is referenced by a set of Member
instances.Member
Modifier and Type | Class and Description |
---|---|
static class |
Group.AclComparator<T extends Group>
DataComparator sorting groups using their ACL.
|
static class |
Group.DataRightComparator<T extends Group>
This comparator sort groups according the DataRight they have.
|
static class |
Group.LastLdapSyncComparator<T extends Group> |
static class |
Group.LeafSelector
Select leaf groups.
|
static class |
Group.MemberCountComparator<T extends Group> |
static class |
Group.MemberSelector
Select groups the given member can read.
|
static class |
Group.NameComparator<T extends Group> |
static class |
Group.NameSelector
Select groups by their name.
|
static class |
Group.NotificationPeriodSelector
Select groups that have at least one NotificationCriteria for which the period
is equal to the period of the period given to the constructor.
|
static class |
Group.OrderComparator<T extends Group> |
static class |
Group.ParentSelector |
static class |
Group.WorkspaceComparator<T extends Group> |
static class |
Group.WorkspaceSelector
DataSelector selecting Groups based on their Workspace.
|
Data.AuthorComparator<T extends Data>, 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.StrongLockSelector
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable>
Modifier and Type | Field and Description |
---|---|
protected AccessControlList |
accessControlList |
protected int |
cookieMaxAge |
protected int |
cookieMaxAgeResolved |
protected java.util.Date |
lastLdapSynchro |
protected java.lang.String |
ldapDN |
protected boolean |
ldapSync |
protected java.lang.String |
name |
protected java.util.HashMap<java.lang.String,java.lang.String> |
nameML |
protected Notification |
notification |
protected int |
order |
protected java.util.HashSet<Group> |
parentSet |
static java.lang.String |
REVISION |
protected java.util.HashMap<java.lang.String,DataRight> |
rightFromClassMap |
protected java.lang.String |
typeReferrer |
protected int |
typeReferrerCount |
protected java.util.TreeSet<Category> |
useCategorySet |
protected int |
visibility |
static int |
VISIBILITY_ADMINS |
static int |
VISIBILITY_DEFAULT |
static int |
VISIBILITY_MEMBERS |
protected boolean |
webdavAccess |
protected Workspace |
workspace |
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, opAuthor, opDelegate
ADMIN_RESOURCE, CTXT_DATA, CTXT_WORKSPACE, GRP_EDIT_RESOURCE, MBR_EDIT_RESOURCE, WORKSPACE_ADMIN_RESOURCE, WS_EDIT_RESOURCE, WSGRP_EDIT_RESOURCE, WSMBR_EDIT_RESOURCE
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG
Modifier and Type | Method and Description |
---|---|
void |
addParent(Group group)
Adds the given group to the parent set of this group.
|
WKRole |
belongsToRole()
Retrieve the first WKRole instance this groups belongs to.
|
boolean |
belongsToRole(WKRole role)
Checks if this group is defined in the specified WKRole.
|
boolean |
canBeReadBy(Member mbr)
Returns true if the given member can view this group.
|
boolean |
canDeleteOther(java.lang.Class<? extends Publication> clazz)
Check if this group can delete object of the given class.
|
boolean |
canEditCategories() |
boolean |
canPublish(java.lang.Class<? extends Publication> clazz)
Check if this group can publish object of the given class.
|
boolean |
canRead(Category cat)
This convenient method check if a group can read a category.
|
boolean |
canRead(Publication pub)
This convenient method check if a group can read a publication.
|
boolean |
canReceiveMail(boolean checkDisable)
Checks if at least one member of the group can receive a valid email.
|
boolean |
canReceiveMail(boolean checkDisable,
boolean notUsed)
Deprecated.
since jcms-6.0.2 see
canReceiveMail(boolean) , will be removed for jcms-6.1 |
boolean |
canUpdateOther(java.lang.Class<? extends Publication> clazz)
Check if this group can update object of the given class.
|
boolean |
canUseCategory(Category cat)
Check if this group can use the given category.
|
ControllerStatus |
checkDelete(Member mbr,
java.util.Map context)
Checks if the deletion can be performed
|
ControllerStatus |
checkIntegrity()
Checks whether or not data integrity constraints are respected.
|
ControllerStatus |
checkMember(int op,
Member mbr,
java.util.Map context)
Checks if the given member can perform the given operation.
|
ControllerStatus |
checkWrite(int op,
Member mbr,
boolean checkIntegrity,
java.util.Map context)
Checks if the given write operation can be performed
|
void |
exportXmlField(java.lang.StringBuffer sb,
int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data.
|
void |
fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
Fill the given string buffer with specific attributes of this data.
|
AccessControlList |
getAccessControlList()
Gets the AccessControlList of this group.
|
static <T extends Group> |
getAclComparator()
Retrieve a new instance of Group comparator sorting groups according their ACL.
|
java.util.Set<Group> |
getAncestorSet(boolean includeMyself)
Returns the ancestors of this group.
|
java.util.Set<Group> |
getChildrenSet()
Return the set of groups which have this group has parent.
|
static java.util.Comparator<Group> |
getComparator(java.lang.String str,
boolean reverse)
Deprecated.
|
int |
getCookieMaxAge()
Return the cookie maximum age value of this group (in seconds).
|
int |
getCookieMaxAgeResolved()
Returns the cookie max-age value to use for this group.
|
static java.lang.String |
getCSVHeader(java.lang.String lang)
Returns the CSV header of this object
|
java.lang.String |
getDataIcon()
Returns source information for the icon associated to this Data, either a relative path or sprite classes name.
|
java.lang.String |
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.
|
int |
getDBMemberCount() |
java.util.Set<Member> |
getDeclaredMemberSet()
Retrieves Set of members who belongs to this group ONLY.
|
java.util.Set<Group> |
getDescendantSet()
Returns the descendant groups of this group.
|
static java.util.TreeSet<Group> |
getGlobalGroupSet()
Returns a set of all Groups set which are global
|
java.lang.String |
getIcon() |
java.lang.String |
getIcon(java.lang.String userLang,
boolean imgTag)
Return the img tag for the icon
|
static <T extends Group> |
getLastLdapSyncComparator() |
java.util.Date |
getLastLdapSynchro() |
java.lang.String |
getLdapDN() |
boolean |
getLdapSync() |
static <T extends Group> |
getMemberCountComparator() |
java.util.Set<Member> |
getMemberSet()
Retrieves Set of members who belongs to this group (or to any child group of this group).
|
java.lang.String |
getName()
Get the value of name.
|
java.lang.String |
getName(java.lang.String lang)
Get the value of name bound to the given language.
|
java.lang.String |
getName(java.lang.String lang,
boolean useDefault)
Get the value of name bound to the given language.
|
static <T extends Group> |
getNameComparator() |
static <T extends Group> |
getNameComparator(java.lang.String lang) |
java.util.HashMap<java.lang.String,java.lang.String> |
getNameML()
Get the value of nameML.
|
Notification |
getNotification()
Retrieves the notifications defined for members of this group.
|
int |
getOrder()
Get the order value of this group.
|
static <T extends Group> |
getOrderComparator() |
java.util.HashSet<Group> |
getParentSet()
Get the parent groups of this groups in a Set.
|
java.util.Set<Publication> |
getPublicationSet()
Retrieves a new set which contains the publications of all the members of this group.
|
DataRight |
getRight(java.lang.Class<?> clazz)
Retrieve the DataRight associated with the specified class for this group.
|
java.util.HashMap<java.lang.String,DataRight> |
getRightFromClassMap()
Retrieves the map associating DataRight instance to the publication type
(class name) on which they must applied.
|
static java.util.Set<Group> |
getRootGroupSet(Workspace ws)
Returns the groups without parent in the given workspace.
|
int |
getTypeReferrerCount()
Returns the number of type referencing this group (through "authgroups" field).
|
java.util.TreeSet<Category> |
getUseCategorySet()
Retrieves the Categories that members of this groups are allowed to use when publishing.
|
int |
getVisibility() |
boolean |
getWebdavAccess()
Checks if member of this group are allowed to access the site using WebDAV.
|
Workspace |
getWorkspace()
Retrieves the Workspace defined for this group.
|
static <T extends Group> |
getWorkspaceComparator() |
java.util.Set<WSTypeEntry> |
getWSTypeEntryReferrerSet()
Returns a set of WSTypeEntry referencing this group.
|
boolean |
hasChildren()
Checks if this group has at least one children.
|
boolean |
hasMultipleParent()
Returns true if this group is attached to 2 or more parent groups.
|
protected boolean |
internalCanBeReadBy(Member mbr) |
boolean |
isAncestor(Group group)
Returns true if given group is an ancestor of this group or is the same object as this group.
|
boolean |
isDescendant(Group group)
Returns true if the given group is a descendant of this group.
|
boolean |
isGlobalGroup()
Checks if this group is a global group or not.
|
boolean |
isLdapGroup() |
boolean |
isSubGroup()
Returns true if this group belongs to at least one parent group.
|
void |
performDelete(Member mbr,
java.util.Map context)
Performs data deletion
|
static void |
printOptionGroup(Group selectedGrp,
javax.servlet.jsp.JspWriter out,
java.lang.String userLang,
Member mbr)
Print the <option> tags for a <select> tag.
|
static void |
printOptionGroup(java.util.Set<Group> selectedSet,
javax.servlet.jsp.JspWriter out,
java.lang.String userLang,
Member mbr)
Print the <option> tags for a <select> tag.
|
static void |
printOptionGroup(Workspace ws,
Group selectedGrp,
javax.servlet.jsp.JspWriter out,
java.lang.String userLang,
Member mbr)
Print the <option> tags for a <select> tag.
|
static void |
printOptionGroup(Workspace ws,
java.util.Set<Group> selectedSet,
javax.servlet.jsp.JspWriter out,
java.lang.String userLang,
Member mbr)
Print the <option> tags for a <select> tag.
|
static void |
printTreeGroup(Workspace ws,
java.lang.String paramName,
javax.servlet.jsp.JspWriter out,
java.lang.String userLang,
JcmsJspContext context)
Print a navigation tree for group splitted by workspaces (except if a workspace is provided).
|
void |
refreshTypeReferrerCount()
Refresh type referrer count.
|
void |
removeParent(Group group)
Removes the given group form the parent set of this group.
|
void |
setAccessControlList(AccessControlList acl)
Sets the AccessControlList of this group.
|
void |
setCookieMaxAge(int cookieMaxAge)
Set the cookie maximum age value to use for member of this group (in seconds).
|
void |
setLastLdapSynchro(java.util.Date date)
Set last LDAP synchronization Date (thus making it an LDAP group).
|
void |
setLdapDN(java.lang.String ldapDN)
Set the distinguish name of this group.
|
void |
setLdapSync(boolean ldapSync)
Set if this group should be synchronized with ldap or not.
|
void |
setName(java.lang.String v)
Set the value of name.
|
void |
setName(java.lang.String lang,
java.lang.String value)
Convenient method to set the value of the Name field
in any language (default site language or any other).
|
void |
setNameML(java.util.HashMap<java.lang.String,java.lang.String> v)
Set the value of nameML.
|
void |
setNotification(Notification notification)
Set the notifications to use for members of this group.
|
void |
setOrder(int order)
Set the order of this group.
|
void |
setParentSet(java.util.HashSet<Group> parentSet)
Set the parent groups of this group.
|
void |
setRightFromClassMap(java.util.HashMap<java.lang.String,DataRight> rightFromClassMap)
Set the map associating DataRight instance to the publication
type (class name) on which they must be applied.
|
void |
setUseCategorySet(java.util.TreeSet<Category> useCategorySet)
Set the Categories that members of this groups are allowed to use when publishing.
|
void |
setVisibility(int v)
Sets the visibility
|
void |
setWebdavAccess(boolean webdavAccess)
Set the authorization for member of this group to access the site using WebDAV.
|
void |
setWorkspace(Workspace workspace)
Sets the Workspace of this group.
|
java.lang.String |
toCSV(java.lang.String lang)
Returns a CSV view of this object
|
java.lang.String |
toString() |
void |
updateMemberSet(Member mbr,
boolean add)
Update the memberSet index.
|
canRequestUnlock, checkCreate, checkCreate, checkDelete, checkIntegrity, checkLockMember, checkStrongLockMember, checkUpdate, checkUpdate, clone, computeDBIDArray, exportXml, exportXml, exportXml, exportXml, exportXmlRelated, exportXmlRelated, getAllReferrerSet, getAllReferrerSet, getAllTypeFieldEntry, getAuthor, getAuthor, getAuthorComparator, getAuthorDBID, getAuthorId, getAuthorSelector, getBooleanFieldValue, getBooleanFieldValue, getCaddyComparator, getCategoryFieldValue, getCategoryFieldValue, getCdateSelector, getDataIconAlt, getDataIconHtml, getDataIconHtml, getDataIconTitle, getDataImage, getDataImage, getDataImage, getDataNameComparator, getDate, getDate, getDateSelector, getDeletableSelector, getDisplayLink, getDisplayLink, getDisplayLink, getDisplayUrl, getDoubleFieldValue, getDoubleFieldValue, getExportXmlDataValue, getExtension, getExtraData, getExtraDataMap, getExtraDBData, getExtraDBDataMap, getExtraInfo, getExtraInfoMap, getFieldStatusMap, getFieldValue, getFieldValue, getFieldValue, getFieldValue, 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, getOpDelegate, getRowId, getRowIdComparator, getStrongLock, getStrongLockDate, getStrongLockInfo, getStrongLockMember, getStrongLockSelector, getTypeEntry, getTypeFieldsEntries, getUpdateInstance, getVirtualIDSet, hashCode, importXml, importXmlFieldsWithReferences, importXmlFiles, importXmlReferences, initializeDBDataCollections, isDBData, isImported, isImportUpdated, isInDatabase, isLocked, isPersisted, isStrongLocked, lock, markNewImport, mergeHybridLink, performAfterWrite, performBeforeWrite, performCreate, performCreate, performDelete, performUpdate, performUpdate, prepareUpdateContext, printDataName, printDisplayLinkEnd, printDisplayLinkStart, printDisplayUrl, printDisplayUrl, putStrongLock, releaseStrongLock, releaseStrongLock, removeExtraData, removeExtraDBData, removeExtraInfo, setAuthor, setAuthorDBID, setAuthorId, setBooleanFieldValue, setCategoryFieldValue, setDoubleFieldValue, setExtension, setExtraData, setExtraDataMap, setExtraDBData, setExtraDBDataMap, setExtraDBDataMap, setExtraInfo, setFieldValue, setFieldValue, setId, setImportAuthor, setImportBatch, setImportDate, setImportDisplayUrl, setImportId, setImportMap, setImportMdate, setImportSignature, setImportSource, setImportSourceUrl, setImportUpdated, setIntFieldValue, setLongFieldValue, setMdate, setOpAuthor, setOpDelegate, setRowId, toFullString, unlock, unlock, unmarkNewImport, updateExtraDataMap, updateExtraDBDataMap, updateIndexTreeSet
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setAttributes, setCdate, setDdate, setStore, toXml
public static final java.lang.String REVISION
public static final int VISIBILITY_DEFAULT
public static final int VISIBILITY_MEMBERS
public static final int VISIBILITY_ADMINS
protected java.lang.String name
protected java.util.HashMap<java.lang.String,java.lang.String> nameML
protected int order
protected java.util.HashMap<java.lang.String,DataRight> rightFromClassMap
protected int cookieMaxAge
protected java.util.TreeSet<Category> useCategorySet
protected Workspace workspace
protected Notification notification
protected boolean webdavAccess
protected java.util.HashSet<Group> parentSet
protected AccessControlList accessControlList
protected int visibility
protected java.lang.String ldapDN
protected boolean ldapSync
protected java.util.Date lastLdapSynchro
protected transient int cookieMaxAgeResolved
protected transient int typeReferrerCount
protected transient java.lang.String typeReferrer
public Group()
public Group(Group other)
public boolean canRead(Category cat)
cat
- the categoryPublication.canBeReadBy(com.jalios.jcms.Group)
public boolean canRead(Publication pub)
pub
- the publicationPublication.canBeReadBy(com.jalios.jcms.Group)
public boolean canEditCategories()
public DataRight getRight(java.lang.Class<?> clazz)
clazz
- the publication type of which to find the DataRightpublic boolean canBeReadBy(Member mbr)
mbr
- the memberprotected boolean internalCanBeReadBy(Member mbr)
public int getCookieMaxAgeResolved()
public java.lang.String toCSV(java.lang.String lang)
public static java.lang.String getCSVHeader(java.lang.String lang)
lang
- the output languagepublic void fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
fillExportXmlFieldAttributes
in class Data
sb
- the StringBufferData.fillExportXmlFieldAttributes(StringBuffer)
public void exportXmlField(java.lang.StringBuffer sb, int indentLevel)
Data
exportXmlField
in class Data
sb
- the StringBufferindentLevel
- the indent levelpublic boolean canPublish(java.lang.Class<? extends Publication> clazz)
clazz
- the classpublic boolean canUpdateOther(java.lang.Class<? extends Publication> clazz)
clazz
- the classpublic boolean canDeleteOther(java.lang.Class<? extends Publication> clazz)
clazz
- the classpublic boolean canUseCategory(Category cat)
cat
- the category to checkpublic ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
checkWrite
in class Data
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcheckIntegrity
- if true, requires the constraints integrity to be checkedcontext
- a map which contains context parameters (may be null)public WKRole belongsToRole()
public boolean belongsToRole(WKRole role)
role
- a WKRole (can be null)@Deprecated public boolean canReceiveMail(boolean checkDisable, boolean notUsed)
canReceiveMail(boolean)
, will be removed for jcms-6.1checkDisable
- check the disable account propertynotUsed
- NOT USED ANYMOREpublic boolean canReceiveMail(boolean checkDisable)
checkDisable
- check the disable account propertypublic boolean isGlobalGroup()
public java.util.Set<Group> getChildrenSet()
public boolean hasChildren()
public boolean isSubGroup()
public boolean hasMultipleParent()
public void addParent(Group group)
group
- to be added.public void removeParent(Group group)
group
- to be removed.public boolean isDescendant(Group group)
group
- the grouppublic java.util.Set<Group> getDescendantSet()
public boolean isAncestor(Group group)
group
- the group to be checked.getAncestorSet(boolean)
public java.util.Set<Group> getAncestorSet(boolean includeMyself)
includeMyself
- if true, the ancestor set contains this group.public java.lang.String getDataIcon()
Data
If this method behavior has not been overriden by subclass, the default icon can be declared
using property types.{Type}.icon
, where {Type}
is the short class name of
the type concerned.
types.Article.icon: images/jalios/icon/abstract.gif
types.Article.icon: ss_sprite ss_date
getDataIcon
in class Data
images/jalios/icon/abstract.gif
) or sprite classes name (eg ss_sprite ss_date
).Data.getDataIconHtml(String)
public java.lang.String getIcon()
public java.lang.String getIcon(java.lang.String userLang, boolean imgTag)
userLang
- the icon languageimgTag
- boolean indicate to return an <img> tagpublic java.lang.String getDataName(java.lang.String language)
Data
getDataName
in class Data
language
- the language in which to return the name if multilang available for the data.getName()
,
Data.getDataName(String)
public java.lang.String getName(java.lang.String lang)
lang
- the language to get the namepublic java.lang.String getName(java.lang.String lang, boolean useDefault)
lang
- the language to get the nameuseDefault
- should main language used as default language
if name does not exist in the given languagepublic java.lang.String getName()
public void setName(java.lang.String v)
v
- Value to assign to v.public java.util.HashMap<java.lang.String,java.lang.String> getNameML()
public void setNameML(java.util.HashMap<java.lang.String,java.lang.String> v)
v
- Value to assign to nameML.public void setName(java.lang.String lang, java.lang.String value)
setName(String)
or setNameML(HashMap)
)
depending on the specified language.lang
- the language (ISO 639 code) in which to set the valuevalue
- the value to set.setName(String)
,
setNameML(HashMap)
public int getOrder()
public void setOrder(int order)
order
- an integer.public boolean getWebdavAccess()
public void setWebdavAccess(boolean webdavAccess)
webdavAccess
- true to authorize WebDAV access, false otherwise.public Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
workspace
- the Workspace to define for this group.
If null, this group will be a global group.public int getCookieMaxAge()
public void setCookieMaxAge(int cookieMaxAge)
getCookieMaxAgeResolved()
.cookieMaxAge
- a duration in seconds indicating the time of validity of the cookiepublic int getVisibility()
public void setVisibility(int v)
v
- the visibilitypublic java.util.HashMap<java.lang.String,DataRight> getRightFromClassMap()
public void setRightFromClassMap(java.util.HashMap<java.lang.String,DataRight> rightFromClassMap)
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);
rightFromClassMap
- a HashMap with class names for keys (String) and DataRight instances for values.public java.util.HashSet<Group> getParentSet()
public void setParentSet(java.util.HashSet<Group> parentSet)
parentSet
- HashSet of Group, can be null or empty.public java.util.Set<Member> getMemberSet()
public int getDBMemberCount()
public java.util.Set<Member> getDeclaredMemberSet()
public void updateMemberSet(Member mbr, boolean add)
mbr
- the member to be added or removedadd
- add if true, remove if falsepublic java.util.TreeSet<Category> getUseCategorySet()
public void setUseCategorySet(java.util.TreeSet<Category> useCategorySet)
useCategorySet
- a TreeSet of Category, if null, an empty TreeSet will be defined.public java.util.Set<Publication> getPublicationSet()
public Notification getNotification()
public void setNotification(Notification notification)
notification
- Notification object defining the notifications queries and criteria.public static <T extends Group> java.util.Comparator<T> getOrderComparator()
public static <T extends Group> java.util.Comparator<T> getNameComparator()
public static <T extends Group> java.util.Comparator<T> getNameComparator(java.lang.String lang)
public static <T extends Group> java.util.Comparator<T> getMemberCountComparator()
public static <T extends Group> java.util.Comparator<T> getWorkspaceComparator()
public static <T extends Group> java.util.Comparator<T> getLastLdapSyncComparator()
public static <T extends Group> java.util.Comparator<T> getAclComparator()
T
- Group classpublic static java.util.Comparator<Group> getComparator(java.lang.String str, boolean reverse)
ComparatorManager
Comparator
given a name representing
it. The returned comparator can be used to sort any Collection
containing Group
s. getNameComparator()
getOrderComparator()
getMemberCountComparator()
getWorkspaceComparator()
getLastLdapSyncComparator()
getAclComparator()
Data.getComparator(String, boolean)
str
- a string representing the comparatorreverse
- a boolean indicating whether the comparator should have
its behavior reversed (true) or unchanged (false)Comparator
.Data.getComparator(String, boolean)
public static java.util.TreeSet<Group> getGlobalGroupSet()
isGlobalGroup()
public ControllerStatus checkIntegrity()
checkIntegrity
in class Data
public ControllerStatus checkMember(int op, Member mbr, java.util.Map context)
checkMember
in class Data
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public ControllerStatus checkDelete(Member mbr, java.util.Map context)
checkDelete
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public int getTypeReferrerCount()
public void refreshTypeReferrerCount()
public java.util.Set<WSTypeEntry> getWSTypeEntryReferrerSet()
public void performDelete(Member mbr, java.util.Map context)
performDelete
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public static java.util.Set<Group> getRootGroupSet(Workspace ws)
ws
- the workspace.public static void printTreeGroup(Workspace ws, java.lang.String paramName, javax.servlet.jsp.JspWriter out, java.lang.String userLang, JcmsJspContext context) throws java.io.IOException
ws
- the workspace.paramName
- the HTTP parameter used to filter on a given parent group.out
- the JSP output stream.userLang
- the user language.context
- the context.java.io.IOException
- if an error occurspublic static void printOptionGroup(Group selectedGrp, javax.servlet.jsp.JspWriter out, java.lang.String userLang, Member mbr) throws java.io.IOException
selectedGrp
- the selected group.out
- the JSP output stream.userLang
- the user language.mbr
- the logged memberjava.io.IOException
- if an error occurspublic static void printOptionGroup(java.util.Set<Group> selectedSet, javax.servlet.jsp.JspWriter out, java.lang.String userLang, Member mbr) throws java.io.IOException
selectedSet
- the set of selected groupsout
- the JSP output stream.userLang
- the user language.mbr
- the logged memberjava.io.IOException
- if an error occurspublic static void printOptionGroup(Workspace ws, Group selectedGrp, javax.servlet.jsp.JspWriter out, java.lang.String userLang, Member mbr) throws java.io.IOException
ws
- the workspace.selectedGrp
- the selected group.out
- the JSP output stream.userLang
- the user language.mbr
- the logged memberjava.io.IOException
- if an error occurspublic static void printOptionGroup(Workspace ws, java.util.Set<Group> selectedSet, javax.servlet.jsp.JspWriter out, java.lang.String userLang, Member mbr) throws java.io.IOException
ws
- the workspace.selectedSet
- the set of selected groupsout
- the JSP output stream.userLang
- the user language.mbr
- the logged memberjava.io.IOException
- if an error occurspublic boolean isLdapGroup()
getLastLdapSynchro()
is
not null AND getLdapDN()
is not empty).
Warning: this method won't return true if the LdapDN has been set
but not the last ldap synchro date.public java.util.Date getLastLdapSynchro()
public void setLastLdapSynchro(java.util.Date date)
date
- the last LDAP synchronization Date (may be null)public java.lang.String getLdapDN()
public void setLdapDN(java.lang.String ldapDN)
ldapDN
- the distinguish name to set, e.g. "cn=Marketing,ou=Groups,dc=company,dc=com"
, (may be null).public boolean getLdapSync()
public void setLdapSync(boolean ldapSync)
ldapSync
- true
if LDAP synchronization of this group should
be performed if needed, false
otherwise.public AccessControlList getAccessControlList()
public void setAccessControlList(AccessControlList acl)
acl
- the AccessControlList to use for this Group, can be nullCopyright © 2001-2010 Jalios SA. All Rights Reserved.