Package io.keikaiex.app.impl
Class CollaborationInfoEx
- java.lang.Object
-
- io.keikaiex.app.impl.CollaborationInfoEx
-
- All Implemented Interfaces:
CollaborationInfo,Serializable
public class CollaborationInfoEx extends Object implements CollaborationInfo, Serializable
- Author:
- JerryChen
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.keikai.app.CollaborationInfo
CollaborationInfo.CollaborationEvent, CollaborationInfo.CollaborationEventListener
-
-
Field Summary
Fields Modifier and Type Field Description protected List<CollaborationInfo.CollaborationEventListener>eventListeners
-
Constructor Summary
Constructors Constructor Description CollaborationInfoEx()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(CollaborationInfo.CollaborationEventListener listener)Event MechanismbooleanaddUsername(String username, String oldUsername)add username and remove old usernameSet<String>getUsedUsernames(String bookName)return username of users which are using book "bookName"StringgetUsername(String originName)return a username which doesn't duplicate with othersbooleanisUsernameExist(String username)ask if username is existingvoidremoveRelationship(String username)remove books having relationship to usernamevoidremoveUsername(String username)remove usernamevoidsetRelationship(String username, Book book)set relationship between username and book
-
-
-
Field Detail
-
eventListeners
protected List<CollaborationInfo.CollaborationEventListener> eventListeners
-
-
Method Detail
-
setRelationship
public void setRelationship(String username, Book book)
Description copied from interface:CollaborationInfoset relationship between username and book- Specified by:
setRelationshipin interfaceCollaborationInfo
-
removeRelationship
public void removeRelationship(String username)
Description copied from interface:CollaborationInforemove books having relationship to username- Specified by:
removeRelationshipin interfaceCollaborationInfo
-
isUsernameExist
public boolean isUsernameExist(String username)
Description copied from interface:CollaborationInfoask if username is existing- Specified by:
isUsernameExistin interfaceCollaborationInfo- Returns:
- true if username has already existed, false otherwise.
-
addUsername
public boolean addUsername(String username, String oldUsername)
Description copied from interface:CollaborationInfoadd username and remove old username- Specified by:
addUsernamein interfaceCollaborationInfo- Returns:
-
removeUsername
public void removeUsername(String username)
Description copied from interface:CollaborationInforemove username- Specified by:
removeUsernamein interfaceCollaborationInfo
-
getUsedUsernames
public Set<String> getUsedUsernames(String bookName)
Description copied from interface:CollaborationInforeturn username of users which are using book "bookName"- Specified by:
getUsedUsernamesin interfaceCollaborationInfo- Returns:
- a set containing usernames
-
getUsername
public String getUsername(String originName)
Description copied from interface:CollaborationInforeturn a username which doesn't duplicate with others- Specified by:
getUsernamein interfaceCollaborationInfo- Returns:
- unique username
-
addEvent
public void addEvent(CollaborationInfo.CollaborationEventListener listener)
Description copied from interface:CollaborationInfoEvent Mechanism- Specified by:
addEventin interfaceCollaborationInfo
-
-