com.ibm.xsp.acl
Class ACL

java.lang.Object
  extended by com.ibm.xsp.acl.ACL
All Implemented Interfaces:
javax.faces.component.StateHolder

public class ACL
extends java.lang.Object
implements javax.faces.component.StateHolder

ACL definition object. This corresponds to the xp:acl tag in the XPage source, that may be set in the "acl" property of the Panel or XPage root control.


Constructor Summary
ACL()
           
 
Method Summary
 boolean addEntry(ACLEntry item)
          Add a new item in the collection 'entries'.
 java.util.List<ACLEntry> getEntries()
          Get the entire collection 'entries'.
 ACLEntry getEntry(int index)
          Get an indexed item in the collection 'entries'.
 int getEntryCount()
          Get the number of item in the collection 'entries'.
 int getUserRights(javax.faces.context.FacesContext context)
          Get the rights for the current user
 boolean isEditor(javax.faces.context.FacesContext context)
          Check if the current user has write access
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setTransient(boolean transientFlag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACL

public ACL()
Method Detail

getUserRights

public int getUserRights(javax.faces.context.FacesContext context)
Get the rights for the current user

Parameters:
context -
Returns:
one of the ACL_* constants like ACLEntry.ACL_EDITOR.

isEditor

public boolean isEditor(javax.faces.context.FacesContext context)
Check if the current user has write access

Returns:
true if the user is granted write access

getEntries

public java.util.List<ACLEntry> getEntries()
Get the entire collection 'entries'.

Returns:
the collection

getEntryCount

public int getEntryCount()
Get the number of item in the collection 'entries'.

Returns:
the number of items

getEntry

public ACLEntry getEntry(int index)
Get an indexed item in the collection 'entries'.

Parameters:
index - the index value
Returns:
the indexed item

addEntry

public boolean addEntry(ACLEntry item)
Add a new item in the collection 'entries'.

Parameters:
item - the item to add
Returns:
true if the operation succeed

setTransient

public void setTransient(boolean transientFlag)
Specified by:
setTransient in interface javax.faces.component.StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder