Package io.keikai.app.impl
Class CollaborationInfoImpl
java.lang.Object
io.keikai.app.impl.CollaborationInfoImpl
- All Implemented Interfaces:
CollaborationInfo,Serializable
- Author:
- JerryChen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.keikai.app.CollaborationInfo
CollaborationInfo.CollaborationEvent, CollaborationInfo.CollaborationEventListener -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEvent MechanismbooleanaddUsername(String username, String oldUsername) add username and remove old usernamestatic CollaborationInfogetUsedUsernames(String bookName) return username of users which are using book "bookName"getUsername(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 Details
-
collaborationInfo
-
-
Constructor Details
-
CollaborationInfoImpl
public CollaborationInfoImpl()
-
-
Method Details
-
getInstance
-
setRelationship
Description copied from interface:CollaborationInfoset relationship between username and book- Specified by:
setRelationshipin interfaceCollaborationInfo
-
removeRelationship
Description copied from interface:CollaborationInforemove books having relationship to username- Specified by:
removeRelationshipin interfaceCollaborationInfo
-
isUsernameExist
Description copied from interface:CollaborationInfoask if username is existing- Specified by:
isUsernameExistin interfaceCollaborationInfo- Returns:
- true if username has already existed, false otherwise.
-
addUsername
Description copied from interface:CollaborationInfoadd username and remove old username- Specified by:
addUsernamein interfaceCollaborationInfo- Returns:
-
removeUsername
Description copied from interface:CollaborationInforemove username- Specified by:
removeUsernamein interfaceCollaborationInfo
-
getUsedUsernames
Description copied from interface:CollaborationInforeturn username of users which are using book "bookName"- Specified by:
getUsedUsernamesin interfaceCollaborationInfo- Returns:
- a set containing usernames
-
getUsername
Description copied from interface:CollaborationInforeturn a username which doesn't duplicate with others- Specified by:
getUsernamein interfaceCollaborationInfo- Returns:
- unique username
-
addEvent
Description copied from interface:CollaborationInfoEvent Mechanism- Specified by:
addEventin interfaceCollaborationInfo
-