|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.policy.AbstractPolicyFilter
com.jalios.jcms.policy.BasicRightPolicyFilter
public class BasicRightPolicyFilter
Default implementation of RightPolicyFilter
RightPolicyFilter| Field Summary | |
|---|---|
static String |
REVISION
|
| Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter |
|---|
order |
| Constructor Summary | |
|---|---|
BasicRightPolicyFilter()
|
|
| Method Summary | |
|---|---|
boolean |
canBeReadBy(boolean isAuthorized,
Category cat,
Group grp,
boolean checkAncestors)
Called by Category.canBeReadBy(Group, boolean). |
boolean |
canBeReadBy(boolean isAuthorized,
Category cat,
Member mbr,
boolean searchInGroups,
boolean checkAncestors)
Called by Category.canBeReadBy(Member, boolean, boolean). |
boolean |
canBeReadBy(boolean isAuthorized,
Publication pub,
Group grp)
Called by Publication.canBeReadBy(Group). |
boolean |
canBeReadBy(boolean isAuthorized,
Publication pub,
Member mbr,
boolean searchInGroups)
Called by Publication.canBeReadBy(Member, boolean). |
boolean |
canCreateWorkspace(boolean isAuthorized,
Member mbr,
Workspace model)
Check if this member can create workspace : - ex nihilo if model is null; - by copiing model if model is not null. |
boolean |
canDeleteOther(boolean isAuthorized,
Member mbr,
Class clazz,
Workspace ws)
Check if this member can delete-other this clazz in at least one of the given workspace. |
boolean |
canDeleteOther(boolean isAuthorized,
Member mbr,
Data data)
Check if this member can delete-other this instance. |
boolean |
canManageCategory(boolean isAuthorized,
Member mbr,
Category cat,
boolean searchInGroups,
boolean searchInParent)
Called by Member.canManageCategory(Category, boolean, boolean). |
boolean |
canPublish(boolean isAuthorized,
Member mbr,
Class clazz,
Set wsSet)
Check if this member can publish this clazz in at least one of the given workspace. |
boolean |
canUpdateOther(boolean isAuthorized,
Member mbr,
Class clazz,
Workspace ws)
Check if this member can update-other this clazz in at least one of the given workspace. |
boolean |
canUpdateOther(boolean isAuthorized,
Member mbr,
Data data)
Check if this member can update-other this instance. |
boolean |
canUseCategory(boolean isAuthorized,
Member mbr,
Category cat,
boolean searchInGroups,
boolean searchInParent)
Called by Member.canUseCategory(Category, boolean, boolean). |
boolean |
canWorkOn(boolean isAuthorized,
Publication pub,
Member member)
Called by Member.canWorkOn(Publication). |
ControllerStatus |
canWorkOn(ControllerStatus status,
int op,
Member mbr,
Member member)
Called by Member.checkMember(int, Member, java.util.Map). |
boolean |
checkAfterUpload(DocUploadInfo info)
Checks if the uploaded file must be accepted or rejected. |
boolean |
checkBeforeUpload(String fieldName,
String contentType,
String fileName)
Checks if the uploaded file must be accepted or rejected. |
ControllerStatus |
checkHtml(String str,
String field)
This method is called to check if the given string does not contain forbidden HTML code |
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration |
boolean |
isWorker(boolean isWorker,
Member member,
Workspace ws)
Called by Member.isWorker(Workspace) and Member.isWorker(). |
| Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter |
|---|
compareTo, equals, getOrder, setOrder |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jalios.jcms.policy.RightPolicyFilter |
|---|
getOrder |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
public static final String REVISION
| Constructor Detail |
|---|
public BasicRightPolicyFilter()
| Method Detail |
|---|
public boolean init(Plugin plugin)
PluginComponent
init in interface PluginComponentplugin - the calling plugin
PluginComponent.init(Plugin)
public boolean canUpdateOther(boolean isAuthorized,
Member mbr,
Data data)
RightPolicyFilterMember.canUpdateOther(Data)
canUpdateOther in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkdata - the data to check
RightPolicyFilter.canUpdateOther(boolean, Member, Data)
public boolean canDeleteOther(boolean isAuthorized,
Member mbr,
Data data)
RightPolicyFilterMember.canDeleteOther(Data)
canDeleteOther in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkdata - the data to check
RightPolicyFilter.canDeleteOther(boolean, Member, Data)
public boolean canBeReadBy(boolean isAuthorized,
Publication pub,
Member mbr,
boolean searchInGroups)
RightPolicyFilterPublication.canBeReadBy(Member, boolean). It checks if
a member can read the given publication.
WARNING: HIGHLY SENSIBLE, do not modify without being sure of what you do,
can dramatically impact performance and can break existing rights behaviour.
canBeReadBy in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionpub - the publication to checkmbr - the member to checksearchInGroups - if true check if one of the group this
member belongs to is authorized to read this publication.
RightPolicyFilter.canBeReadBy(boolean, Publication, Member, boolean)
public boolean canBeReadBy(boolean isAuthorized,
Publication pub,
Group grp)
RightPolicyFilterPublication.canBeReadBy(Group). It checks if
a group can read this publication.
canBeReadBy in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionpub - the publication to checkgrp - the group to check
RightPolicyFilter.canBeReadBy(boolean, Publication, Group)
public boolean canWorkOn(boolean isAuthorized,
Publication pub,
Member member)
RightPolicyFilterMember.canWorkOn(Publication). It checks if the
given member can work on the given publication (ie, if it has the
rights and if it is in a state the member can work in).
canWorkOn in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionpub - the publication to checkmember - the member to check
RightPolicyFilter.canWorkOn(boolean, Publication, Member)
public ControllerStatus canWorkOn(ControllerStatus status,
int op,
Member mbr,
Member member)
RightPolicyFilterMember.checkMember(int, Member, java.util.Map). It checks if the
given member can work on the given publication (ie, if it has the
rights and if it is in a state the member can work in).
canWorkOn in interface RightPolicyFilterstatus - the internal JCMS controller status.op - the operation (OP_CREATE, OP_UPDATE, OP_DELETE)mbr - the member to checkmember - the member to check
RightPolicyFilter.canWorkOn(ControllerStatus, int, Member, Member)
public boolean isWorker(boolean isWorker,
Member member,
Workspace ws)
RightPolicyFilterMember.isWorker(Workspace) and Member.isWorker(). It checks
if the given Member is a Worker for the site or the given workspace
isWorker in interface RightPolicyFilterisWorker - true if internal JCMS control authorized the member to perform this actionmember - the member to checkws - the workspace to check or null if caller is Member.isWorker()
RightPolicyFilter.isWorker(boolean, Member, Workspace)
public boolean canPublish(boolean isAuthorized,
Member mbr,
Class clazz,
Set wsSet)
RightPolicyFilterMember.canPublish(Class, Set)
canPublish in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkclazz - the class to checkwsSet - the Set ow workspace to work with
RightPolicyFilter.canPublish(boolean, Member, Class, Set)
public boolean canUpdateOther(boolean isAuthorized,
Member mbr,
Class clazz,
Workspace ws)
RightPolicyFilterMember.canUpdateOther(Class, Workspace)
canUpdateOther in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkclazz - the class to checkws - the Workspace to check
RightPolicyFilter.canUpdateOther(boolean, Member, Class, Workspace)
public boolean canDeleteOther(boolean isAuthorized,
Member mbr,
Class clazz,
Workspace ws)
RightPolicyFilterMember.canDeleteOther(Class, Workspace)
canDeleteOther in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkclazz - the class to checkws - the Workspace to check
RightPolicyFilter.canDeleteOther(boolean, Member, Class, Workspace)
public boolean canBeReadBy(boolean isAuthorized,
Category cat,
Member mbr,
boolean searchInGroups,
boolean checkAncestors)
RightPolicyFilterCategory.canBeReadBy(Member, boolean, boolean). It checks if
a member can read the given category.
canBeReadBy in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actioncat - the category to checkmbr - the member to checksearchInGroups - if true check if one of the group this
member belongs to is authorized to read this category.checkAncestors - if true checks the read rights of the ancestors of this category.
RightPolicyFilter.canBeReadBy(boolean, Category, Member, boolean, boolean)
public boolean canBeReadBy(boolean isAuthorized,
Category cat,
Group grp,
boolean checkAncestors)
RightPolicyFilterCategory.canBeReadBy(Group, boolean). It checks if
a group can read this category.
canBeReadBy in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actioncat - the category to checkgrp - the group to checkcheckAncestors - if true checks the read rights of the ancestors of this category.
RightPolicyFilter.canBeReadBy(boolean, Category, Group, boolean)
public boolean canUseCategory(boolean isAuthorized,
Member mbr,
Category cat,
boolean searchInGroups,
boolean searchInParent)
RightPolicyFilterMember.canUseCategory(Category, boolean, boolean). It check if a category
can be used by given Member.
Note In current implementation:
canUseCategory in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkcat - the category to checksearchInGroups - if true check if one of the group thissearchInParent - if true check in parent category
RightPolicyFilter.canUseCategory(boolean, Member, Category, boolean, boolean)
public boolean canManageCategory(boolean isAuthorized,
Member mbr,
Category cat,
boolean searchInGroups,
boolean searchInParent)
RightPolicyFilterMember.canManageCategory(Category, boolean, boolean). It check if a category
can be managed by given Member
canManageCategory in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkcat - the category to checksearchInGroups - if true check if one of the group thissearchInParent - if true check in parent category
RightPolicyFilter.canManageCategory(boolean, Member, Category, boolean, boolean)
public boolean canCreateWorkspace(boolean isAuthorized,
Member mbr,
Workspace model)
RightPolicyFilterMember.canCreateWorkspace(Workspace)
canCreateWorkspace in interface RightPolicyFilterisAuthorized - true if internal JCMS control authorized the member to perform this actionmbr - the member to checkmodel - the workspace to duplicate or null if the workspace has to be created ex nihilo
RightPolicyFilter.canCreateWorkspace(boolean, Member, Workspace)
public boolean checkBeforeUpload(String fieldName,
String contentType,
String fileName)
RightPolicyFilter
checkBeforeUpload in interface RightPolicyFilterfieldName - the name of the field for the given filecontentType - the content type of the filefileName - the name of the file
RightPolicyFilter.checkBeforeUpload(String, String, String)public boolean checkAfterUpload(DocUploadInfo info)
RightPolicyFilter
checkAfterUpload in interface RightPolicyFilterinfo - information about the uploaded file
RightPolicyFilter.checkAfterUpload(DocUploadInfo)
public ControllerStatus checkHtml(String str,
String field)
RightPolicyFilter
checkHtml in interface RightPolicyFilterstr - the String to be checkedfield - the name of the field which is checked
RightPolicyFilter.checkHtml(String, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||