|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.caddy.Caddy
public class Caddy
Repository of Data
which a JCMS member can act on.
This include the following:
Publication
Category
Workspace
Group
Member
and DBMember
Caddy myCaddy = Caddy.getCaddy(request);
Field Summary | |
---|---|
static String |
REVISION
|
Method Summary | |
---|---|
boolean |
add(Data data)
Add given data to this caddy. |
boolean |
addAll(Collection<? extends Data> coll)
Add given Collection of data to this caddy. |
boolean |
addDBMemberId(String id)
Add the specified DBMember's id to the caddy. |
boolean |
addDBMemberIds(Collection<? extends String> coll)
Add the specified collection of DBMember's id to the Caddy. |
boolean |
canManage(Class<? extends Data> clazz,
Member loggedMember)
Checks if the specified member is allowed to manage at least one Data in the Caddy. |
static boolean |
checkCaddyAccess(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 |
ArrayList<Category> |
getCategoryList()
Create and returns a new list containing all Category contained in the caddy. |
int |
getCategoryListSize()
|
ArrayList<String> |
getDBMemberList()
Create and returns a new list containing all DBMember ids contained in the caddy. |
int |
getDBMemberListSize()
|
ArrayList<Group> |
getGroupList()
Create and returns a new list containing all Group contained in the caddy. |
int |
getGroupListSize()
|
ArrayList<? extends Object> |
getList(Class<? extends Data> clazz)
|
ArrayList<Member> |
getMemberList()
Create and returns a new list containing all Member contained in the caddy. |
int |
getMemberListSize()
|
ArrayList<Publication> |
getPublicationList()
Create and returns a new list containing all Publication contained in the caddy. |
int |
getPublicationListSize()
|
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(Collection<? extends Data> coll)
Remove given Collection of data from this caddy. |
boolean |
removeDBMemberIds(Collection<? extends String> coll)
Remove the specified collection of DBMember's id to the Caddy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Method Detail |
---|
public static Caddy getCaddy(javax.servlet.http.HttpServletRequest request)
request
- current HttpServletRequest
public boolean addAll(Collection<? extends Data> coll)
coll
- the Collection of Data to add (can contain Publication, Category, Workspace, Group and/or Member)
public boolean removeAll(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 caddy
public boolean contains(Data data)
data
- the Data to check for
public ArrayList<? extends Object> getList(Class<? extends Data> clazz)
clazz
- the type of Data being worked on (Publication, Category, Workspace, Group or Member)
public void clear()
public boolean isEmpty()
public boolean canManage(Class<? extends Data> clazz, Member loggedMember)
clazz
- the type of Data being worked on (Publication, Category, Workspace, Group or Member)loggedMember
-
public static boolean checkCaddyAccess(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 Workspace
public void clearPublications()
Publication
of the caddy.
public ArrayList<Publication> getPublicationList()
Publication
contained in the caddy.
ArrayList
of Publication
.public int getPublicationListSize()
public void clearCategories()
Category
of the caddy.
public ArrayList<Category> getCategoryList()
Category
contained in the caddy.
ArrayList
of Category
.public int getCategoryListSize()
public void clearWorkspaces()
Workspace
of the caddy.
public ArrayList<Workspace> getWorkspaceList()
Workspace
contained in the caddy.
ArrayList
of Workspace
.public int getWorkspaceListSize()
public void clearGroups()
Group
of the caddy.
public 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 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 ArrayList<String> getDBMemberList()
DBMember
ids contained in the caddy.
ArrayList
of String
.public int getDBMemberListSize()
DBMember
currently store in the caddypublic boolean addDBMemberIds(Collection<? extends String> coll)
coll
- a Collection of String (DBMember's id), must not be null.
public boolean removeDBMemberIds(Collection<? extends String> coll)
coll
- a Collection of String (DBMember's id), must not be null.
public boolean addDBMemberId(String id)
id
- a DBMember id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |