public class SimpleMailboxACL extends Object implements MailboxACL
MailboxACL.| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleMailboxACL.Rfc4314Rights
Supports only the Standard Rights of RFC 4314 section 2.1.
|
static class |
SimpleMailboxACL.SimpleMailboxACLEntry
A utility implementation of
Map.Entry<MailboxACLEntryKey, MailboxACLRights>. |
static class |
SimpleMailboxACL.SimpleMailboxACLEntryKey
Default implementation of
MailboxACLEntryKey. |
static class |
SimpleMailboxACL.SimpleMailboxACLRight
Default implementation of
MailboxACL.MailboxACLRight. |
MailboxACL.EditMode, MailboxACL.MailboxACLEntryKey, MailboxACL.MailboxACLRight, MailboxACL.MailboxACLRights, MailboxACL.NameType, MailboxACL.SpecialName| Modifier and Type | Field and Description |
|---|---|
static MailboxACL.MailboxACLEntryKey |
ANYBODY_KEY |
static MailboxACL.MailboxACLEntryKey |
ANYBODY_NEGATIVE_KEY |
static MailboxACL.MailboxACLEntryKey |
AUTHENTICATED_KEY |
static MailboxACL.MailboxACLEntryKey |
AUTHENTICATED_NEGATIVE_KEY |
static MailboxACL |
EMPTY |
static MailboxACL.MailboxACLRights |
FULL_RIGHTS |
static MailboxACL.MailboxACLRights |
NO_RIGHTS |
static MailboxACL |
OWNER_FULL_ACL |
static MailboxACL |
OWNER_FULL_EXCEPT_ADMINISTRATION_ACL |
static MailboxACL.MailboxACLEntryKey |
OWNER_KEY |
static MailboxACL.MailboxACLEntryKey |
OWNER_NEGATIVE_KEY |
ADD_RIGHTS_MARKER, DEFAULT_GROUP_MARKER, DEFAULT_NEGATIVE_MARKER, REMOVE_RIGHTS_MARKER| Constructor and Description |
|---|
SimpleMailboxACL()
Creates a new instance of SimpleMailboxACL containing no entries.
|
SimpleMailboxACL(Map.Entry<MailboxACL.MailboxACLEntryKey,MailboxACL.MailboxACLRights>[] entries)
Creates a new instance of SimpleMailboxACL from the given array of
entries.
|
SimpleMailboxACL(Map<MailboxACL.MailboxACLEntryKey,MailboxACL.MailboxACLRights> entries)
Creates a new instance of SimpleMailboxACL from the given
Map of
entries. |
SimpleMailboxACL(Properties props)
Creates a new instance of SimpleMailboxACL from
Properties. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
MailboxACL |
except(MailboxACL.MailboxACLEntryKey key,
MailboxACL.MailboxACLRights mailboxACLRights)
TODO except.
|
MailboxACL |
except(MailboxACL other)
Performs the set theoretic operation of relative complement of toRemove
MailboxACL in this MailboxACL. |
Map<MailboxACL.MailboxACLEntryKey,MailboxACL.MailboxACLRights> |
getEntries()
Map of entries. |
int |
hashCode() |
MailboxACL |
replace(MailboxACL.MailboxACLEntryKey key,
MailboxACL.MailboxACLRights replacement)
Replaces the entry corresponding to the given
key with
toAddlink MailboxACLRights}. |
String |
toString() |
MailboxACL |
union(MailboxACL.MailboxACLEntryKey key,
MailboxACL.MailboxACLRights mailboxACLRights)
TODO union.
|
MailboxACL |
union(MailboxACL other)
Performs the set theoretic operation of union of this
MailboxACL
and toAdd MailboxACL. |
public static final MailboxACL.MailboxACLEntryKey ANYBODY_KEY
public static final MailboxACL.MailboxACLEntryKey ANYBODY_NEGATIVE_KEY
public static final MailboxACL.MailboxACLEntryKey AUTHENTICATED_KEY
public static final MailboxACL.MailboxACLEntryKey AUTHENTICATED_NEGATIVE_KEY
public static final MailboxACL EMPTY
public static final MailboxACL.MailboxACLRights FULL_RIGHTS
public static final MailboxACL.MailboxACLRights NO_RIGHTS
public static final MailboxACL OWNER_FULL_ACL
public static final MailboxACL OWNER_FULL_EXCEPT_ADMINISTRATION_ACL
public static final MailboxACL.MailboxACLEntryKey OWNER_KEY
public static final MailboxACL.MailboxACLEntryKey OWNER_NEGATIVE_KEY
public SimpleMailboxACL()
public SimpleMailboxACL(Map.Entry<MailboxACL.MailboxACLEntryKey,MailboxACL.MailboxACLRights>[] entries)
entries - public SimpleMailboxACL(Map<MailboxACL.MailboxACLEntryKey,MailboxACL.MailboxACLRights> entries)
Map of
entries.entries - public SimpleMailboxACL(Properties props) throws UnsupportedRightException
Properties. The
keys and values from the props parameter are parsed by the
String constructors of SimpleMailboxACL.SimpleMailboxACLEntryKey and
SimpleMailboxACL.Rfc4314Rights respectively.props - UnsupportedRightExceptionpublic boolean equals(Object o)
equals in class ObjectObject.equals(java.lang.Object)public MailboxACL except(MailboxACL other) throws UnsupportedRightException
MailboxACLMailboxACL in this MailboxACL.
A schematic example: "user1:lr;user2:lrwt".except("user1:w;user2:t")
returns "user1:lr;user2:lrw".
Implementations must return a new unmodifiable instance of
MailboxACL. However, implementations may decide to return this or
toRemove parameter value in case the result would be equal to the
respective one of those.
Implementations must ensure that the result does not contain entries with
empty rigths. E.g. "user1:lr;user2:lrwt".except("user1:lr") should return
"user2:lrwt" rather than "user1:;user2:lrwt"except in interface MailboxACLUnsupportedRightExceptionorg.apache.james.mailbox.MailboxACL#except(org.apache.james.mailbox.MailboxACL)public MailboxACL except(MailboxACL.MailboxACLEntryKey key, MailboxACL.MailboxACLRights mailboxACLRights) throws UnsupportedRightException
MailboxACLexcept in interface MailboxACLUnsupportedRightExceptionMailboxACL.except(org.apache.james.mailbox.model.MailboxACL.MailboxACLEntryKey, org.apache.james.mailbox.model.MailboxACL.MailboxACLRights)public Map<MailboxACL.MailboxACLEntryKey,MailboxACL.MailboxACLRights> getEntries()
MailboxACLMap of entries.getEntries in interface MailboxACLorg.apache.james.mailbox.MailboxACL#getEntries()public int hashCode()
hashCode in class ObjectObject.hashCode()public MailboxACL replace(MailboxACL.MailboxACLEntryKey key, MailboxACL.MailboxACLRights replacement) throws UnsupportedRightException
MailboxACLkey with
toAddlink MailboxACLRights}.
Implementations must return a new unmodifiable instance of
MailboxACL. However, implementations may decide to return this in
case the result would be equal to it.
Implementations must ensure that the result does not contain entries with
empty rigths. E.g. "user1:lr;user2:lrwt".replace("user1",
MailboxACLRights.EMPTY) should return "user2:lrwt" rather than
"user1:;user2:lrwt". The same result should be returned by
"user1:lr;user2:lrwt".replace("user1", null).replace in interface MailboxACLUnsupportedRightExceptionMailboxACL.replace(org.apache.james.mailbox.model.MailboxACL.MailboxACLEntryKey, org.apache.james.mailbox.model.MailboxACL.MailboxACLRights)public String toString()
toString in class ObjectObject.toString()public MailboxACL union(MailboxACL other) throws UnsupportedRightException
MailboxACLMailboxACL
and toAdd MailboxACL.
A schematic example:
"user1:lr;user2:lrwt".union("user1:at;-$group1:lrwt") returns
"user1:alrt;user2:lrwt;-$group1:lrwt".
Implementations must return a new unmodifiable instance of
MailboxACL. However, implementations may decide to return this or
toAdd parameter value in case the result would be equal to the respective
one of those.union in interface MailboxACLUnsupportedRightExceptionorg.apache.james.mailbox.MailboxACL#union(org.apache.james.mailbox.MailboxACL)public MailboxACL union(MailboxACL.MailboxACLEntryKey key, MailboxACL.MailboxACLRights mailboxACLRights) throws UnsupportedRightException
MailboxACLunion in interface MailboxACLUnsupportedRightExceptionMailboxACL.union(org.apache.james.mailbox.model.MailboxACL.MailboxACLEntryKey, org.apache.james.mailbox.model.MailboxACL.MailboxACLRights)Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.