Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiSecurableElement

All Superinterfaces:
EbiElement
All Known Subinterfaces:
EbiContentAdmin, EbiDirectory, EbiDirectoryEntry, EbiDocCategory, EbiDocField, EbiDocFolder, EbiDocLayoutStyle, EbiDocType, EbiDocument, EbiQueryResult, EbiSearchAdmin

public interface EbiSecurableElement
extends EbiElement

Interface implemented by the portal elements that are securable. An application can set and get permissions for securable elements.

Each element type has a set of access rights, which is the list of permissions supported by the element type. Element types are defined as constants in subinterfaces of EbiFrameworkElement. To find out the access rights for a particular element, get a Security meta delegate, getting the EbiAccessRightMeta object for the desired element type, then retrieve the list of supported permissions:

   com.sssw.fw.security.api.EbiSecurityMetaDelegate smd = 
       com.sssw.fw.client.factory.getSecurityMetaDelegate();
    com.sssw.fw.security.api.EbiAccessRightMeta meta = 
       smd.getAccessRightMeta(context, elementType);
    String[] rights = meta.getPermissionNames();
 

You can use the values in the resulting String array in methods of EbiSecurableElement that specify an access right.

See Also:
EbiSecurityMetaDelegate, EbiAccessRightMeta

Method Summary
 Acl getAcl(EbiContext context)
          Gets the access control list that is currently set for this securable element.
 String getObjectID()
          Returns the ID that is used for setting permissions for this securable element.
 boolean isUserAuthorized(EbiContext context, String accessRight)
          Checks to see if the current user is authorized to access this element.
 boolean removeAcl(EbiContext context)
          Removes the Access Control List that is currently set for this securable element.
 void setAcl(EbiContext context, Acl acl)
          Sets an access control list for this securable element.
 
Methods implemented from interface com.sssw.fw.api.EbiElement
getType
 

Method Detail

getObjectID

public String getObjectID()
Returns the ID that is used for setting permissions for this securable element.
Returns:
The object ID.

isUserAuthorized

public boolean isUserAuthorized(EbiContext context,
                                String accessRight)
                         throws EboUnrecoverableSystemException,
                                EboSecurityException
Checks to see if the current user is authorized to access this element. For information on how Director determines authorization, see chapter on authorizing access in Director online help.
Parameters:
context - The context, which contains information about the logged-in user.
accessRight - The access right to check. For sample code that gets the access rights for an element type, see EbiSecurableElement.
Returns:
Boolean true if the user has the specified type of access, false otherwise.
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  

setAcl

public void setAcl(EbiContext context,
                   Acl acl)
            throws EboUnrecoverableSystemException,
                   EboSecurityException
Sets an access control list for this securable element.
Parameters:
context - An EbiContext object.
acl - An ACL.
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  

getAcl

public Acl getAcl(EbiContext context)
           throws EboUnrecoverableSystemException,
                  EboSecurityException
Gets the access control list that is currently set for this securable element.
Parameters:
context - An EbiContext object.
Returns:
the ACL, or null if no ACL is set.
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  

removeAcl

public boolean removeAcl(EbiContext context)
                  throws EboUnrecoverableSystemException,
                         EboSecurityException
Removes the Access Control List that is currently set for this securable element.
Parameters:
context - An EbiContext object.
Returns:
Boolean true if the ACL was successfully removed, false if no ACL had been set.
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  

Novell exteNd
Director 5.2 API