public class Caddy
extends java.lang.Object
implements java.io.Serializable
Data which a JCMS member can act on.
This include the following:
PublicationCategoryWorkspaceGroupMember and DBMemberCaddy myCaddy = Caddy.getCaddy(request);
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REVISION |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Data data)
Add given data to this caddy.
|
boolean |
addAll(java.util.Collection<? extends Data> coll)
Add given Collection of data to this caddy.
|
boolean |
addDBMemberId(java.lang.String id)
Add the specified DBMember's id to the caddy.
|
boolean |
addDBMemberIds(java.util.Collection<? extends java.lang.String> coll)
Add the specified collection of DBMember's id to the Caddy.
|
boolean |
canManage(java.lang.Class<? extends Data> clazz,
Member loggedMember)
Checks if the specified member is allowed to manage the specified class of Data.
|
static boolean |
checkCaddyAccess(java.lang.Class<? extends Data> clazz,
Member loggedMember,
Workspace workspace)
Check if a member is authorized to display
the caddy corresponding to the specified clazz.
|
void |
clear()
Clear the caddy (from all Data, Publication, Categories, Workspaces, Groups and Members).
|
void |
clearCategories()
Clear all
Category of the caddy. |
void |
clearDBMembers()
Clear all
DBMember of the caddy. |
void |
clearGroups()
Clear all
Group of the caddy. |
void |
clearMembers()
Clear all
Member of the caddy. |
void |
clearPublications()
Clear all
Publication of the caddy. |
void |
clearWorkspaces()
Clear all
Workspace of the caddy. |
boolean |
contains(Data data)
Check if the given Data is in the caddy.
|
static Caddy |
getCaddy(javax.servlet.http.HttpServletRequest request)
Returns a Caddy of the member using the current Session of the request
|
java.util.ArrayList<Category> |
getCategoryList()
Create and returns a new list containing all
Category contained in the caddy. |
int |
getCategoryListSize() |
java.util.ArrayList<java.lang.String> |
getDBMemberList()
Create and returns a new list containing all
DBMember ids contained in the caddy. |
int |
getDBMemberListSize() |
java.util.ArrayList<Group> |
getGroupList()
Create and returns a new list containing all
Group contained in the caddy. |
int |
getGroupListSize() |
java.util.ArrayList<? extends java.lang.Object> |
getList(java.lang.Class<? extends Data> clazz)
Create and returns a new list containing all
Data of the specified class contained in the caddy. |
int |
getListSize(java.lang.Class<? extends Data> clazz)
Retrieve the number of
Data of the specified class contained in the caddy. |
java.util.ArrayList<Member> |
getMemberList()
Create and returns a new list containing all
Member contained in the caddy. |
int |
getMemberListSize() |
java.util.ArrayList<Publication> |
getPublicationList()
Create and returns a new list containing all
Publication contained in the caddy. |
int |
getPublicationListSize() |
java.util.ArrayList<Workspace> |
getWorkspaceList()
Create and returns a new list containing all
Workspace contained in the caddy. |
int |
getWorkspaceListSize() |
boolean |
isEmpty()
Returns true if this caddy contains no elements.
|
boolean |
remove(Data data)
Remove the given data from this caddy.
|
boolean |
removeAll(java.util.Collection<? extends Data> coll)
Remove given Collection of data from this caddy.
|
boolean |
removeDBMemberIds(java.util.Collection<? extends java.lang.String> coll)
Remove the specified collection of DBMember's id to the Caddy.
|
public static final java.lang.String REVISION
public static Caddy getCaddy(javax.servlet.http.HttpServletRequest request)
request - current HttpServletRequestpublic boolean addAll(java.util.Collection<? extends Data> coll)
coll - the Collection of Data to add (can contain Publication, Category, Workspace, Group and/or Member)public boolean removeAll(java.util.Collection<? extends Data> coll)
coll - the Collection of Data to remove (can contain Publication, Category, Workspace, Group and/or Member)public boolean add(Data data)
data - the Data to add (either a Publication, a Category, a Workspace, a Group or a Member)public boolean remove(Data data)
data - the Data to add to the caddypublic boolean contains(Data data)
data - the Data to check forpublic java.util.ArrayList<? extends java.lang.Object> getList(java.lang.Class<? extends Data> clazz)
Data of the specified class contained in the caddy.clazz - the type of Data being worked on (Publication, Category, Workspace, Group or Member)public int getListSize(java.lang.Class<? extends Data> clazz)
Data of the specified class contained in the caddy.clazz - the type of Data being worked on (Publication, Category, Workspace, Group or Member)public void clear()
public boolean isEmpty()
public boolean canManage(java.lang.Class<? extends Data> clazz, Member loggedMember)
Implementation detail : since JCMS-5762,
this method simply delegates to checkCaddyAccess(Class, Member, Workspace).
clazz - the type of Data being worked on (Publication, Category, Workspace, Group or Member)loggedMember - public static boolean checkCaddyAccess(java.lang.Class<? extends Data> clazz, Member loggedMember, Workspace workspace)
This method does not verify operation are authorized on Data, it only check that the user could work with some data of the specified class. CRUD right are performed later by each CaddyHandler
clazz - the type of Data being worked on (Publication, Category, Workspace, Group or Member)loggedMember - workspace - the current Workspacepublic void clearPublications()
Publication of the caddy.public java.util.ArrayList<Publication> getPublicationList()
Publication contained in the caddy.ArrayList of Publication.public int getPublicationListSize()
public void clearCategories()
Category of the caddy.public java.util.ArrayList<Category> getCategoryList()
Category contained in the caddy.ArrayList of Category.public int getCategoryListSize()
public void clearWorkspaces()
Workspace of the caddy.public java.util.ArrayList<Workspace> getWorkspaceList()
Workspace contained in the caddy.ArrayList of Workspace.public int getWorkspaceListSize()
public void clearGroups()
Group of the caddy.public java.util.ArrayList<Group> getGroupList()
Group contained in the caddy.ArrayList of Group.public int getGroupListSize()
Group currently store in the caddypublic void clearMembers()
Member of the caddy.public java.util.ArrayList<Member> getMemberList()
Member contained in the caddy.ArrayList of Member.public int getMemberListSize()
Member currently store in the caddypublic void clearDBMembers()
DBMember of the caddy.public java.util.ArrayList<java.lang.String> getDBMemberList()
DBMember ids contained in the caddy.ArrayList of String.public int getDBMemberListSize()
DBMember currently store in the caddypublic boolean addDBMemberIds(java.util.Collection<? extends java.lang.String> coll)
coll - a Collection of String (DBMember's id), must not be null.public boolean removeDBMemberIds(java.util.Collection<? extends java.lang.String> coll)
coll - a Collection of String (DBMember's id), must not be null.public boolean addDBMemberId(java.lang.String id)
id - a DBMember idCopyright © 2001-2017 Jalios SA. All Rights Reserved.