com.sun.im.service
Interface AccessRule

All Known Subinterfaces:
PresenceAccessRule

public interface AccessRule

access rule. This class defines a group of people who are allowed or not to perform some operation on some resource. The operation and resource in question are not defined in this class. They are defined in specific extensions of this class.

The group of people is defined by a list of principals and/or by a domain specification.


Field Summary
static java.lang.String ALL_DOMAINS
           
 
Method Summary
 void addExceptPrincipal(CollaborationPrincipal principal)
           
 void addExceptPrincipal(java.lang.String uid)
           
 void addPrincipal(CollaborationPrincipal principal)
           
 void addPrincipal(java.lang.String uid)
           
 java.lang.String getDomain()
          DNS domain which applies to this rule.
 java.lang.String getExceptDomain()
          DNS domain which is an exception to the domain specified by the domain attribute.
 java.util.Collection getExceptPrincipals()
          list of principals who make exception to this rule.
 java.util.Collection getPrincipals()
          list of principals to which this rule applies.
 java.lang.String getResourceURL()
          return the resource URL
 boolean grant()
          whether this is a grant or a deny rule
 void removeAllExceptPrincipals()
           
 void removeAllPrincipals()
           
 void removeExceptPrincipal(java.lang.String uid)
           
 void removePrincipal(CollaborationPrincipal principal)
           
 void removePrincipal(java.lang.String uid)
           
 void setGrant(boolean grant)
          whether this is a grant or a deny rule
 

Field Detail

ALL_DOMAINS

public static final java.lang.String ALL_DOMAINS
See Also:
Constant Field Values
Method Detail

getResourceURL

public java.lang.String getResourceURL()
return the resource URL


grant

public boolean grant()
whether this is a grant or a deny rule


setGrant

public void setGrant(boolean grant)
whether this is a grant or a deny rule


getDomain

public java.lang.String getDomain()
DNS domain which applies to this rule. The @@ macro can be use to identify the whole internet.


getExceptDomain

public java.lang.String getExceptDomain()
DNS domain which is an exception to the domain specified by the domain attribute. Ity must be a subset of domain.


getPrincipals

public java.util.Collection getPrincipals()
list of principals to which this rule applies. Some principals may be groups. This list is ignored if domain is not null.


getExceptPrincipals

public java.util.Collection getExceptPrincipals()
list of principals who make exception to this rule. Principals in this list must be either listed (indirectly) as part of principals or domain.


addPrincipal

public void addPrincipal(java.lang.String uid)
                  throws CollaborationException
Throws:
CollaborationException

addPrincipal

public void addPrincipal(CollaborationPrincipal principal)
                  throws CollaborationException
Throws:
CollaborationException

removePrincipal

public void removePrincipal(java.lang.String uid)
                     throws CollaborationException
Throws:
CollaborationException

removePrincipal

public void removePrincipal(CollaborationPrincipal principal)
                     throws CollaborationException
Throws:
CollaborationException

removeAllPrincipals

public void removeAllPrincipals()
                         throws CollaborationException
Throws:
CollaborationException

addExceptPrincipal

public void addExceptPrincipal(java.lang.String uid)
                        throws CollaborationException
Throws:
CollaborationException

addExceptPrincipal

public void addExceptPrincipal(CollaborationPrincipal principal)
                        throws CollaborationException
Throws:
CollaborationException

removeExceptPrincipal

public void removeExceptPrincipal(java.lang.String uid)
                           throws CollaborationException
Throws:
CollaborationException

removeAllExceptPrincipals

public void removeAllExceptPrincipals()
                               throws CollaborationException
Throws:
CollaborationException