| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jstore.BasicStorable
com.jalios.jcms.Data
com.jalios.jcms.Group
public class Group
A Group object is referenced by a set of
 Member instances.
Member| Nested Class Summary | |
|---|---|
| static class | Group.LastLdapSyncComparator<T extends Group> | 
| static class | Group.MemberCountComparator<T extends Group> | 
| static class | Group.NameComparator<T extends Group> | 
| static class | Group.NameSelectorSelect groups by their name. | 
| static class | Group.NotificationPeriodSelectorSelect 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.WorkspaceSelectorDataSelector selecting Groups based on their Workspace. | 
| Nested classes/interfaces inherited from class com.jalios.jcms.Data | 
|---|
| 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> | 
| Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable | 
|---|
| BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable> | 
| Field Summary | |
|---|---|
| protected  int | cookieMaxAge | 
| protected  int | cookieMaxAgeResolved | 
| protected  Date | lastLdapSynchro | 
| protected  String | ldapDN | 
| protected  boolean | ldapSync | 
| protected  String | name | 
| protected  Notification | notification | 
| protected  int | order | 
| protected  HashSet<Group> | parentSet | 
| static String | REVISION | 
| protected  HashMap<String,DataRight> | rightFromClassMap | 
| protected  String | typeReferrer | 
| protected  int | typeReferrerCount | 
| protected  TreeSet<Category> | useCategorySet | 
| protected  boolean | webdavAccess | 
| protected  Workspace | workspace | 
| Fields inherited from class com.jalios.jcms.Data | 
|---|
| author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, lockDate, lockMember, opAuthor, opDelegate | 
| Fields inherited from class com.jalios.jstore.BasicStorable | 
|---|
| cdate, ddate, id, mdate, store | 
| Fields inherited from interface com.jalios.util.JaliosConstants | 
|---|
| CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR | 
| Fields inherited from interface com.jalios.jcms.mashup.ImportConstants | 
|---|
| IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP | 
| Fields inherited from interface com.jalios.jcms.mashup.MashupConstants | 
|---|
| DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG | 
| Constructor Summary | |
|---|---|
| Group() | |
| Group(Group other) | |
| Method Summary | ||
|---|---|---|
|  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 | canDeleteOther(Class<? extends Publication> clazz)Check if this group can delete object of the given class. | |
|  boolean | canEditCategories() | |
|  boolean | canPublish(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(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,
            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,
            Map context)Checks if the given member can perform the given operation. | |
|  ControllerStatus | checkWrite(int op,
           Member mbr,
           boolean checkIntegrity,
           Map context)Checks if the given write operation can be performed | |
|  void | exportXmlField(StringBuffer sb,
               int indentLevel)Fills the given StringBuffer with Xml export of fields of this data. | |
|  void | fillExportXmlFieldAttributes(StringBuffer sb)Fill the given string buffer with specific attributes of this data. | |
|  Set<Group> | getAncestorSet(boolean includeMyself)Returns the ancestors of this group. | |
|  Set<Group> | getChildrenSet()Return the set of groups which have this group has parent. | |
| static Comparator<Group> | getComparator(String str,
              boolean reverse)Retrieves a new Comparatorgiven a name representing
 it. | |
|  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 String | getCSVHeader(String lang)Returns the CSV header of this object | |
|  String | getDataName(String language)Return the name of this Data, every sub class Data which will be displayed to user should implements this method already. | |
|  Set<Group> | getDescendantSet()Returns the descendant groups of this group. | |
| static TreeSet<Group> | getGlobalGroupSet()Returns a set of all Groups set which are global | |
|  String | getIcon() | |
|  String | getIcon(String userLang,
        boolean imgTag)Return the img tag for the icon | |
| static
 | getLastLdapSyncComparator() | |
|  Date | getLastLdapSynchro() | |
|  String | getLdapDN() | |
|  boolean | getLdapSync() | |
| static
 | getMemberCountComparator() | |
|  Set<Member> | getMemberSet()Retrieves Set of members who belongs to this group (or to any child group of this group). | |
|  String | getName()Gets the name of this group. | |
| static
 | getNameComparator() | |
|  Notification | getNotification()Retrieves the notifications defined for members of this group. | |
|  int | getOrder()Get the order value of this group. | |
| static
 | getOrderComparator() | |
|  HashSet<Group> | getParentSet()Get the parent groups of this groups in a Set. | |
|  Set<Publication> | getPublicationSet()Retrieves a new set which contains the publications of all the members of this group. | |
|  DataRight | getRight(Class<?> clazz)Retrieve the DataRight associated with the specified class for this group. | |
|  HashMap<String,DataRight> | getRightFromClassMap()Retrieves the map associating DataRight instance to the publication type (class name) on which they must applied. | |
| static 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). | |
|  TreeSet<Category> | getUseCategorySet()Retrieves the Categories that members of this groups are allowed to use when publishing. | |
|  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
 | getWorkspaceComparator() | |
|  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. | |
|  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,
              Map context)Performs data deletion | |
| static void | printOptionGroup(Group selectedGrp,
                 javax.servlet.jsp.JspWriter out,
                 String userLang)Print the <option> tags for a <select> tag. | |
| static void | printOptionGroup(Set<Group> selectedSet,
                 javax.servlet.jsp.JspWriter out,
                 String userLang)Print the <option> tags for a <select> tag. | |
| static void | printOptionGroup(Workspace ws,
                 Group selectedGrp,
                 javax.servlet.jsp.JspWriter out,
                 String userLang)Print the <option> tags for a <select> tag. | |
| static void | printOptionGroup(Workspace ws,
                 Set<Group> selectedSet,
                 javax.servlet.jsp.JspWriter out,
                 String userLang)Print the <option> tags for a <select> tag. | |
| static void | printTreeGroup(Workspace ws,
               String paramName,
               javax.servlet.jsp.JspWriter out,
               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 | setCookieMaxAge(int cookieMaxAge)Set the cookie maximum age value to use for member of this group (in seconds). | |
|  void | setLastLdapSynchro(Date date)Set last LDAP synchronization Date (thus making it an LDAP group). | |
|  void | setLdapDN(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(String name)Set the name of this group. | |
|  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(HashSet<Group> parentSet)Set the parent groups of this group. | |
|  void | setRightFromClassMap(HashMap<String,DataRight> rightFromClassMap)Set the map associating DataRight instance to the publication type (class name) on which they must be applied. | |
|  void | setUseCategorySet(TreeSet<Category> useCategorySet)Set the Categories that members of this groups are allowed to use when publishing. | |
|  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. | |
|  String | toCSV(String lang)Returns a CSV view of this object | |
|  String | toString() | |
|  void | updateMemberSet(Member mbr,
                boolean add)Update the memberSet index. | |
| Methods inherited from class com.jalios.jstore.BasicStorable | 
|---|
| clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setCdate, setDdate, setId, setStore, toXml | 
| Methods inherited from class java.lang.Object | 
|---|
| finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
protected String name
protected int order
protected HashMap<String,DataRight> rightFromClassMap
protected int cookieMaxAge
protected TreeSet<Category> useCategorySet
protected Workspace workspace
protected Notification notification
protected boolean webdavAccess
protected HashSet<Group> parentSet
protected String ldapDN
protected boolean ldapSync
protected Date lastLdapSynchro
protected transient int cookieMaxAgeResolved
protected transient int typeReferrerCount
protected transient String typeReferrer
| Constructor Detail | 
|---|
public Group()
public Group(Group other)
| Method Detail | 
|---|
public boolean canRead(Category cat)
cat - the category
Publication.canBeReadBy(com.jalios.jcms.Group)public boolean canRead(Publication pub)
pub - the publication
Publication.canBeReadBy(com.jalios.jcms.Group)public boolean canEditCategories()
public DataRight getRight(Class<?> clazz)
clazz - the publication type of which to find the DataRight
public String toString()
toString in class Datapublic int getCookieMaxAgeResolved()
public String toCSV(String lang)
toCSV in class Datalang - the output language
public static String getCSVHeader(String lang)
lang - the output language
public void fillExportXmlFieldAttributes(StringBuffer sb)
fillExportXmlFieldAttributes in class Datasb - the StringBufferData.fillExportXmlFieldAttributes(StringBuffer)
public void exportXmlField(StringBuffer sb,
                           int indentLevel)
Data
exportXmlField in class Datasb - the StringBufferindentLevel - the indent levelpublic boolean canPublish(Class<? extends Publication> clazz)
clazz - the class
public boolean canUpdateOther(Class<? extends Publication> clazz)
clazz - the class
public boolean canDeleteOther(Class<? extends Publication> clazz)
clazz - the class
public boolean canUseCategory(Category cat)
cat - the category to check
public ControllerStatus checkWrite(int op,
                                   Member mbr,
                                   boolean checkIntegrity,
                                   Map context)
checkWrite in class Dataop - 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)
public boolean canReceiveMail(boolean checkDisable,
                              boolean notUsed)
canReceiveMail(boolean), will be removed for jcms-6.1
checkDisable - check the disable account propertynotUsed - NOT USED ANYMORE
public boolean canReceiveMail(boolean checkDisable)
checkDisable - check the disable account property
public boolean isGlobalGroup()
public 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 - 
public Set<Group> getDescendantSet()
public boolean isAncestor(Group group)
group - the group to be checked.
getAncestorSet(boolean)public Set<Group> getAncestorSet(boolean includeMyself)
includeMyself - if true, the ancestor set contains this group.
public String getIcon()
public String getIcon(String userLang,
                      boolean imgTag)
userLang - the icon languageimgTag - boolean indicate to return an <img> tag
public String getDataName(String language)
Data
getDataName in class Datalanguage - the language in which to return the name if multilang available for the data.
getName(), 
Data.getDataName(String)public String getName()
public void setName(String name)
name - the name to use.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 HashMap<String,DataRight> getRightFromClassMap()
public void setRightFromClassMap(HashMap<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 HashSet<Group> getParentSet()
public void setParentSet(HashSet<Group> parentSet)
parentSet - HashSet of Group, can be null or empty.public Set<Member> getMemberSet()
public void updateMemberSet(Member mbr,
                            boolean add)
mbr - the member to be added or removedadd - add if true, remove if falsepublic TreeSet<Category> getUseCategorySet()
public void setUseCategorySet(TreeSet<Category> useCategorySet)
useCategorySet - a TreeSet of Category, if null, an empty TreeSet will be defined.public 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> Comparator<T> getOrderComparator()
public static <T extends Group> Comparator<T> getNameComparator()
public static <T extends Group> Comparator<T> getMemberCountComparator()
public static <T extends Group> Comparator<T> getWorkspaceComparator()
public static <T extends Group> Comparator<T> getLastLdapSyncComparator()
public static Comparator<Group> getComparator(String str,
                                              boolean reverse)
Comparator given a name representing
 it. The returned comparator can be used to sort any 
 Collection containing Groups.
 getNameComparator()getOrderComparator()getMemberCountComparator()getWorkspaceComparator()getLastLdapSyncComparator()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 TreeSet<Group> getGlobalGroupSet()
isGlobalGroup()public ControllerStatus checkIntegrity()
checkIntegrity in class Data
public ControllerStatus checkMember(int op,
                                    Member mbr,
                                    Map context)
checkMember in class Dataop - 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,
                                    Map context)
checkDelete in class Datambr - the member which requests the write operationcontext - a map which contains context parameters (may be null)
public int getTypeReferrerCount()
public void refreshTypeReferrerCount()
public Set<WSTypeEntry> getWSTypeEntryReferrerSet()
public void performDelete(Member mbr,
                          Map context)
performDelete in class Datambr - the member which requests the write operationcontext - a map which contains context parameters (may be null)public static Set<Group> getRootGroupSet(Workspace ws)
ws - the workspace.
public static void printTreeGroup(Workspace ws,
                                  String paramName,
                                  javax.servlet.jsp.JspWriter out,
                                  String userLang,
                                  JcmsJspContext context)
                           throws 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.
IOException
public static void printOptionGroup(Group selectedGrp,
                                    javax.servlet.jsp.JspWriter out,
                                    String userLang)
                             throws IOException
selectedGrp - the selected group.out - the JSP output stream.userLang - the user language.
IOException
public static void printOptionGroup(Set<Group> selectedSet,
                                    javax.servlet.jsp.JspWriter out,
                                    String userLang)
                             throws IOException
selectedSet - the set of selected groupsout - the JSP output stream.userLang - the user language.
IOException
public static void printOptionGroup(Workspace ws,
                                    Group selectedGrp,
                                    javax.servlet.jsp.JspWriter out,
                                    String userLang)
                             throws IOException
ws - the workspace.selectedGrp - the selected group.out - the JSP output stream.userLang - the user language.
IOException
public static void printOptionGroup(Workspace ws,
                                    Set<Group> selectedSet,
                                    javax.servlet.jsp.JspWriter out,
                                    String userLang)
                             throws IOException
ws - the workspace.selectedSet - the set of selected groupsout - the JSP output stream.userLang - the user language.
IOExceptionpublic 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 Date getLastLdapSynchro()
public void setLastLdapSynchro(Date date)
date - the last LDAP synchronization Date (may be null)public String getLdapDN()
public void setLdapDN(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.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||