|
Oracle Application Server Wireless Java API Reference B10400-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Community is a collection of users. A ccommunity can be used as a unit for privacy granting, i.e. instead of granting the right to the community members one by one, the community can be granted the right The Community interface provides methods to retrieve information about the community object, add/remove members to/from the community, and set community attributes.
Field Summary | |
static java.lang.String |
CMTY_PRIVATE The private community type Every user can create her own private community. |
static java.lang.String |
CMTY_SHARED The shared community type The community and its member list are visible to all the community members. |
static java.lang.String |
CMTY_SYSTEM The system community type The system community can only be created by the system administrator. |
static java.lang.String |
TYPENAME The constant class type identifier. |
Fields inherited from interface oracle.panama.model.ModelObject |
TYPEID |
Method Summary | |
void |
addMember(User requester, User newMember) Add a member to the community. |
void |
addMember(User requester, User[] newMembers) Add multiple new members to the community. |
ResultSetEnumeration |
getAllMembers() Get all the members in the community |
java.lang.String |
getCommunityType() Get the type of the community |
User |
getCreator() Get the creator of the community |
java.lang.String |
getName() get the name of the community |
ResultSetEnumeration |
getVisibleMembers(User requester) get all the members that the requester has the right to see |
boolean |
isCreator(User user) check whether the user is the creator of the community |
boolean |
isMember(User user) check whether the user is a member of this community |
void |
removeAllMembers(User requester) remove all members from the community. |
void |
removeMember(User requester, User member) remove a member from the community. |
void |
removeMember(User requester, User[] members) remove multiple members from the community. |
void |
setName(User requester, java.lang.String newName) Set the name of the community. |
boolean |
visibleTo(User user) check whether the community is visible to the user A private community is only visible to its creator. |
Methods inherited from interface oracle.panama.model.ModelObject |
delete, getCreatedDate, getId, getLastModifiedDate, getTypeId, getTypeName, isSystem, setName, setSystem, undoAll |
Methods inherited from interface oracle.panama.model.XMLObject |
setXML, toXML |
Field Detail |
public static final java.lang.String TYPENAME
public static final java.lang.String CMTY_PRIVATE
public static final java.lang.String CMTY_SHARED
public static final java.lang.String CMTY_SYSTEM
Method Detail |
public java.lang.String getCommunityType()
public ResultSetEnumeration getAllMembers()
public User getCreator()
public java.lang.String getName()
getName
in interface ModelObject
public boolean isMember(User user)
public boolean isCreator(User user)
public ResultSetEnumeration getVisibleMembers(User requester)
requester
has the right to seerequester
- The user who would like to get the members that are visible to herpublic void addMember(User requester, User newMember) throws PanamaException
requester
should have the right to add the newMember
to the community, otherwise a LocationPrivacyException is thrown. For private and shared community, only the community creator has the right to add a new member to the community. For system community, the system administrator has the right to add a new member to the community.requester
- The user who requests to add a membernewMember
- The user who will be addedIf
- the requester does not have enough right, a LocationPrivacyException is thrown. If other errors occur, a PanamaException is thrownPanamaException
LocationPrivacyException
public void addMember(User requester, User[] newMembers) throws PanamaException
requester
should have the right to add members to the community, otherwise a LocationPrivacyException is thrown For private and shared community, only the community creator has the right to add new members to the community. For system community, the system administrator has the right to add new members to the community.requester
- The user who requests to add membersnewMembers
- An array of users who will be added to the communityIf
- the requester does not have enough right, a LocationPrivacyException is thrown. If other errors occur, a PanamaException is thrownPanamaException
LocationPrivacyException
public void removeMember(User requester, User member) throws PanamaException
requester
should have the right to remove the member
from the community, otherwise a LocationPrivacyException is thrown For private community, only the community creator has the right to remove a member from the community. For system community, the system administrator has the right to remove a member from the community. For shared community, the creator has the right to remove a member from the community and each member has right to remove herself from the community.requester
- The user who requests to remove a membermember
- The user who will be removed from the communityIf
- the requester does not have enough right, a LocationPrivacyException is thrown. If other errors occur, a PanamaException is thrownPanamaException
LocationPrivacyException
public void removeMember(User requester, User[] members) throws PanamaException
requester
should have the right to remove members
from the community, otherwise a LocationPrivacyException is thrown For private community, only the community creator has the right to remove members from the community. For system community, the system administrator has the right to remove members from the community. For shared community, the creator has the right to remove members from the community and each member has right to remove herself from the community.requester
- The user who requests to remove membersIf
- the requester does not have enough right, a LocationPrivacyException is thrown. If other errors occur, a PanamaException is thrownPanamaException
LocationPrivacyException
public void removeAllMembers(User requester) throws PanamaException
requester
should have the right to remove all members from the community, otherwise a LocationPrivacyException is thrown For private and shared community, only the community creator has the right to remove all members from the community. For system community, the system administrator has the right to remove all members from the community.requester
- The user who requests to remove membersIf
- the requester does not have enough right, a LocationPrivacyException is thrown. If other errors occur, a PanamaException is thrownPanamaException
LocationPrivacyException
public void setName(User requester, java.lang.String newName) throws PanamaException
requester
must be the creator of the community. otherwise a LocationPrivacyException is thrownrequester
- The user who requests to set the community namenewName
- The new name that will be set for the communityIf
- the requester does not have enough right, a LocationPrivacyException is thrown. If other errors occur, a PanamaException is thrownPanamaException
LocationPrivacyException
public boolean visibleTo(User user) throws PanamaException
user
A private community is only visible to its creator. A shared community is visible to its creator and its member. A system community is visible to all users.PanamaException
|
Oracle Application Server Wireless Java API Reference B10400-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |