|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jstore.BasicStorable com.jalios.jcms.Data com.jalios.jcms.workspace.WKRole
public class WKRole
Nested Class Summary |
---|
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>, Data.RowIdComparator<T extends Data>, Data.StrongLockSelector |
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 | |
---|---|
static int |
AND_MODE
|
protected ArrayList<Group> |
groupList
|
protected int |
groupMode
|
protected boolean |
isInvolvedAuthor
|
protected ArrayList<Member> |
memberList
|
protected int |
memberMode
|
protected Set<Member> |
memberSet
|
static String |
OPEN_MODE_DISABLED
|
static String |
OPEN_MODE_ENABLED
|
static String |
OPEN_MODE_REQUIRED
|
protected String |
openMode
|
static int |
OR_MODE
|
static String |
REVISION
|
protected int[] |
roleWeight
|
protected boolean[] |
roleWeightType
|
static boolean |
WEIGHT_COUNT
|
static boolean |
WEIGHT_PERCENTAGE
|
protected Workspace |
workspace
|
Fields inherited from class com.jalios.jcms.Data |
---|
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, 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 | |
---|---|
WKRole()
|
|
WKRole(WKRole other)
|
Method Summary | |
---|---|
void |
addGroup(Group grp,
int weight,
boolean type)
|
void |
addMember(Member member)
Convenient method to add a Member |
ControllerStatus |
checkIntegrity(Map context)
Checks whether or not data integrity constraints are respected. |
int |
getExpectedWeight(Group group,
Publication pub)
Gives the minimum of expected member for this group. |
int |
getExpectedWeight(int groupIndex,
Publication pub)
Gives the minimum of expected member of the group corresponding to this index in the groupList of the given publication. |
ArrayList<Group> |
getGroupList()
|
int |
getGroupMode()
|
ArrayList<Member> |
getMemberList()
|
int |
getMemberMode()
|
String |
getName(String lang)
Returns the localized name of the WFRole bound to this WKRole. |
String |
getOpenMode()
Returns the openMode if this role is open (i.e. |
int[] |
getRoleWeight()
|
boolean[] |
getRoleWeightType()
|
int |
getWeightForGroup(Group group)
Return the value of the weight for a Group |
int |
getWeightForGroup(int pos)
Return the value of the weight for a Group |
WFRole |
getWFRole()
Returns the WFRole bound to this WKRole. |
Set<Member> |
getWorkerSet(Publication pub,
boolean searchInGroups)
Deprecated. Use new signature with publication class as third parameter to manage correctly creation process (pub == null) |
Set<Member> |
getWorkerSet(Publication pub,
boolean searchInGroups,
Class<?> pubClass)
Returns a Set of Member that can work on the role. |
Workflow |
getWorkflow()
Returns the Workflow bound to this WKRole. |
String |
getWorkflowLabel(String lang)
Returns the localized label of the workflow this WFRole is bound to. |
Workspace |
getWorkspace()
|
boolean |
isExplicitInvolved(Publication pub,
Member member,
boolean searchInGroups)
Check if the member is explicitely involved in the role or belongs to a groups involved in this Role. |
boolean |
isGroupModeAND()
|
boolean |
isGroupModeOR()
|
boolean |
isInvolved(Group group)
Check if the group is involved to this Role |
boolean |
isInvolved(Member member,
boolean searchInGroups)
Check if the member is involved in the role or belongs to a groups involved in this Role |
boolean |
isInvolved(Publication pub,
Member member,
boolean searchInGroups)
Check if the member is involved in the role or belongs to a groups involved in this Role |
boolean |
isInvolved(Publication pub,
Member member,
boolean searchInGroups,
boolean ignoreAuthorInvolvementAtCreation)
Check if the member is involved in the role or belongs to a groups involved in this Role |
boolean |
isInvolvedAuthor()
|
boolean |
isMemberModeAND()
|
boolean |
isMemberModeOR()
|
static boolean |
isOpen(WKRole role)
|
static boolean |
isOpenAndRequired(WKRole role)
|
boolean |
isPercentageForGroup(Group group)
|
boolean |
isPercentageForGroup(int pos)
|
void |
setGroupList(ArrayList<Group> groupList)
|
void |
setGroupMode(int groupMode)
|
void |
setInvolvedAuthor(boolean involvedAuthor)
|
void |
setMemberList(ArrayList<Member> memberList)
|
void |
setMemberMode(int memberMode)
|
void |
setOpenMode(String openMode)
Set the value of open ("enabled", "disabled", "required"). |
void |
setRoleWeight(int[] roleWeight)
|
void |
setRoleWeightType(boolean[] roleWeightType)
|
void |
setWorkspace(Workspace workspace)
|
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
public static final boolean WEIGHT_PERCENTAGE
public static final boolean WEIGHT_COUNT
public static final int AND_MODE
public static final int OR_MODE
protected ArrayList<Group> groupList
protected ArrayList<Member> memberList
protected int[] roleWeight
protected boolean[] roleWeightType
protected boolean isInvolvedAuthor
protected String openMode
protected int groupMode
protected int memberMode
protected transient Workspace workspace
protected transient Set<Member> memberSet
public static String OPEN_MODE_ENABLED
public static String OPEN_MODE_REQUIRED
public static String OPEN_MODE_DISABLED
Constructor Detail |
---|
public WKRole()
public WKRole(WKRole other)
Method Detail |
---|
public void addMember(Member member)
member
- the Member to addpublic void addGroup(Group grp, int weight, boolean type)
grp
- the Group to addweight
- the weight of the grouptype
- the weight type of the group % or quantitypublic int getWeightForGroup(Group group)
group
- A group
public int getWeightForGroup(int pos)
pos
- index of the group in the list
public boolean isPercentageForGroup(Group group)
group
- the group
public boolean isPercentageForGroup(int pos)
pos
- index of the group in the list
public int getExpectedWeight(Group group, Publication pub)
group
- the grouppub
- the publication
public int getExpectedWeight(int groupIndex, Publication pub)
groupIndex
- the index of the group in the groupList of the publicationpub
- the publication
public boolean isInvolved(Member member, boolean searchInGroups)
member
- the member to checksearchInGroups
- if we should look in member groups
public boolean isExplicitInvolved(Publication pub, Member member, boolean searchInGroups)
pub
- the publication to workOn or null if it is a global testmember
- the member to checksearchInGroups
- if we should look in member groups
public boolean isInvolved(Publication pub, Member member, boolean searchInGroups)
pub
- the publication to workOn or null if it is a global testmember
- the member to checksearchInGroups
- if we should look in member groups
public boolean isInvolved(Publication pub, Member member, boolean searchInGroups, boolean ignoreAuthorInvolvementAtCreation)
pub
- the publication to workOn or null if it is a global testmember
- the member to checksearchInGroups
- if we should look in member groupsignoreAuthorInvolvementAtCreation
- true if the method should ignore unexplicit role due to author rights at creation (when pub is null)
public boolean isInvolved(Group group)
group
-
public Set<Member> getWorkerSet(Publication pub, boolean searchInGroups)
pub
- the publication
(since the author must be added if he is involved in this role
and the selected workers must have rights to read the publication)searchInGroups
- if true add members from groups
public Set<Member> getWorkerSet(Publication pub, boolean searchInGroups, Class<?> pubClass)
pub
- the publication
(since the author must be added if he is involved in this role
and the selected workers must have rights to read the publication)searchInGroups
- if true add members from groupspubClass
- Class
of the publication if pub is null (creation process)
public WFRole getWFRole()
public String getName(String lang)
lang
- the language.
public Workflow getWorkflow()
public String getWorkflowLabel(String lang)
lang
- the language.
public ArrayList<Group> getGroupList()
public void setGroupList(ArrayList<Group> groupList)
groupList
- The groupList to set.public ArrayList<Member> getMemberList()
public void setMemberList(ArrayList<Member> memberList)
memberList
- The memberList to set.public Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
workspace
- The workgroup to set.public int[] getRoleWeight()
public void setRoleWeight(int[] roleWeight)
roleWeight
- The roleWeight to set.public boolean[] getRoleWeightType()
public void setRoleWeightType(boolean[] roleWeightType)
roleWeightType
- The roleWeightType to set.public boolean isInvolvedAuthor()
public void setInvolvedAuthor(boolean involvedAuthor)
involvedAuthor
- The involveAuthor to set.public String getOpenMode()
public void setOpenMode(String openMode)
openMode
- the value to setpublic static boolean isOpen(WKRole role)
public static boolean isOpenAndRequired(WKRole role)
public int getGroupMode()
public void setGroupMode(int groupMode)
public int getMemberMode()
public void setMemberMode(int memberMode)
public boolean isMemberModeOR()
public boolean isMemberModeAND()
public boolean isGroupModeOR()
public boolean isGroupModeAND()
public ControllerStatus checkIntegrity(Map context)
Data
checkIntegrity
in class Data
context
- a map which contains context parameters (may be null)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |