|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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 | |
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 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.PanamaException
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 thrownPanamaException
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 deletedPanamaException
public ResultSetEnumeration getCommunities()
public Community getCommunity(long commId)
commId
- Community object Idpublic 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 communitypublic ResultSetEnumeration getCreatedCommunities(User creator)
creator
creator
- the user who creates the communitiespublic ResultSetEnumeration getCreatedCommunities(User creator, java.lang.String type)
creator
, with the type of type
creator
- 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 static CommunityManager getInstance()
public ResultSetEnumeration getVisibleCommunities(User user, java.lang.String cmtyType)
user
and with the type of type
Community
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |