Package com.contentful.java.cma.model
Class CMAPolicy
- java.lang.Object
-
- com.contentful.java.cma.model.CMAPolicy
-
public class CMAPolicy extends java.lang.ObjectWhat do allow or deny a role to do.
-
-
Constructor Summary
Constructors Constructor Description CMAPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMAPolicyallow()This policy describes action _allowed_ by the assigned role.CMAPolicyarchive()Add archiving to the allowed actions.CMAPolicycreate()Add creating to the allowed actions.CMAPolicydelete()Add deleting to the allowed actions.CMAPolicydeny()This policy should describe actions which are _denied_ by the assigned role.java.lang.ObjectgetActions()This can method can return a string, 'all', a list of strings identifying the actions, or null.CMAConstraintgetConstraint()java.lang.StringgetEffect()CMAPolicypublish()Add publishing to the allowed actions.CMAPolicyread()Add reading to the allowed actions.CMAPolicysetActions(java.util.List<java.lang.String> actions)Replace the current actions with new ones.CMAPolicysetConstraint(CMAConstraint constraint)Set the constraint to be used.CMAPolicysetEffect(java.lang.String effect)Set a general effect of this policy.java.lang.StringtoString()CMAPolicyunarchive()Add unarchiving to the allowed actions.CMAPolicyunpublish()Add unpublishing to the allowed actions.CMAPolicyupdate()Add updating to the allowed actions.
-
-
-
Field Detail
-
ALLOW
public static final java.lang.String ALLOW
- See Also:
- Constant Field Values
-
DENY
public static final java.lang.String DENY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setEffect
public CMAPolicy setEffect(java.lang.String effect)
Set a general effect of this policy.
-
getConstraint
public CMAConstraint getConstraint()
- Returns:
- the constraints set on this policy.
-
setConstraint
public CMAPolicy setConstraint(CMAConstraint constraint)
Set the constraint to be used.- Parameters:
constraint- to be set.- Returns:
- this instance for chaining.
-
getActions
public java.lang.Object getActions()
This can method can return a string, 'all', a list of strings identifying the actions, or null.- Returns:
- the actions set on this policy.
-
setActions
public CMAPolicy setActions(java.util.List<java.lang.String> actions)
Replace the current actions with new ones.- Parameters:
actions- the actions replacing the current ones.- Returns:
- this instance for chaining.
-
allow
public CMAPolicy allow()
This policy describes action _allowed_ by the assigned role.- Returns:
- this instance for chaining.
-
deny
public CMAPolicy deny()
This policy should describe actions which are _denied_ by the assigned role.- Returns:
- this instance for chaining.
-
read
public CMAPolicy read()
Add reading to the allowed actions.- Returns:
- this instance for chaining.
-
create
public CMAPolicy create()
Add creating to the allowed actions.- Returns:
- this instance for chaining.
-
update
public CMAPolicy update()
Add updating to the allowed actions.- Returns:
- this instance for chaining.
-
delete
public CMAPolicy delete()
Add deleting to the allowed actions.- Returns:
- this instance for chaining.
-
publish
public CMAPolicy publish()
Add publishing to the allowed actions.- Returns:
- this instance for chaining.
-
unpublish
public CMAPolicy unpublish()
Add unpublishing to the allowed actions.- Returns:
- this instance for chaining.
-
archive
public CMAPolicy archive()
Add archiving to the allowed actions.- Returns:
- this instance for chaining.
-
unarchive
public CMAPolicy unarchive()
Add unarchiving to the allowed actions.- Returns:
- this instance for chaining.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- a human readable string, representing the object.
-
-