|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.panama.mp.privacy.CommunityManager
The community manager handles community related operations, such as creating community, deleting community, retrieving community.
| Method Summary |
| Type | Method |
|---|---|
Community |
createCommunity(User creator,
java.lang.String cmtyName,
java.lang.String cmtyType,
User[] members)
Creates a new community |
void |
deleteCommunity(User deleter,
Community cmty)
Deletes a community. |
void |
deleteCommunity(User deleter,
java.lang.String cmtyName)
Deletes a community. |
ResultSetEnumeration |
getCommunities()
Get all the communities in the system. |
Community |
getCommunity(long commId)
Get the community by community Id |
Community |
getCommunity(User creator,
java.lang.String commName)
Get the community in the system, created by the creator and with the name of commName. |
ResultSetEnumeration |
getCreatedCommunities(User creator)
Get all of the communities in the system created by the creator |
ResultSetEnumeration |
getCreatedCommunities(User creator,
java.lang.String type)
Get the communities in the system created by the creator, with the type of type |
static CommunityManager |
getInstance()
The singleton thread-safe getter. |
ResultSetEnumeration |
getVisibleCommunities(User user,
java.lang.String cmtyType)
Get the communities in the system that are visible to the user and with the type of type |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static CommunityManager getInstance()
public Community createCommunity(User creator,
java.lang.String cmtyName,
java.lang.String cmtyType,
User[] members)
throws PanamaException
creator - The creator of the new communitycmtyName - The name of the new communitycmtyType - The type of the new community
The type can be one of the three values defined in the Community interface:
CMTY_PRIVATE,CMTY_SHARED,CMTY_SYSTEMIf - the same creator already has a community with the same name, a LocationPrivacyException
is thrown. If other errors happen, a PanamaException is thrown.Community,
LocationPrivacyException
public void deleteCommunity(User deleter,
Community cmty)
throws PanamaException
deleter must have the right to delete the community,
otherwise a LocationPrivacyException will be thrown.deleter - The user who wants to delete the communitycmty - The community to be deletedIf - the deleter does not have enough right, a LocationPrivacyException is thrown,
If other errors occur, a PanamaException is thrown
public void deleteCommunity(User deleter,
java.lang.String cmtyName)
throws PanamaException
deleter must be the creator of the community.
A user and the name of a community uniquely identify a community. The method
tries to find a community which is created by deleter and has the name of
cmtyName and delete it.
If the community does not exist, a PanamaException is thrown.deleter - The user who wants to delete the communitycmtyName - The name of the community to be deletedpublic ResultSetEnumeration getCommunities()
public ResultSetEnumeration getCreatedCommunities(User creator,
java.lang.String type)
creator, with the type of typecreator - the user who creates the communitiestype - the type of the communities to be retrieved
The type can be one of the three values defined in Community interface:
CMTY_PRIVATE,CMTY_SHARED,CMTY_SYSTEMCommunitypublic ResultSetEnumeration getCreatedCommunities(User creator)
creatorcreator - the user who creates the communities
public ResultSetEnumeration getVisibleCommunities(User user,
java.lang.String cmtyType)
user and with the type of typecreator - the user who creates the communitiestype - the type of the communities to be retrieved
The type can be one of the three values defined in Community interface:
CMTY_PRIVATE,CMTY_SHARED,CMTY_SYSTEMCommunity
public Community getCommunity(User creator,
java.lang.String commName)
creator and with the name of commName.
Creator and community name uniquely identify a communitycreator - the user who creates the communityname - the name of the community to be retrievedpublic Community getCommunity(long commId)
commId - Community object Id
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||