public class CollaborationInfoImpl extends Object implements CollaborationInfo, Serializable
CollaborationInfo.CollaborationEvent, CollaborationInfo.CollaborationEventListener
Modifier and Type | Field and Description |
---|---|
protected static CollaborationInfo |
collaborationInfo |
Constructor and Description |
---|
CollaborationInfoImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(CollaborationInfo.CollaborationEventListener listener)
Event Mechanism
|
boolean |
addUsername(String username,
String oldUsername)
add username and remove old username
|
static CollaborationInfo |
getInstance() |
Set<String> |
getUsedUsernames(String bookName)
return username of users which are using book "bookName"
|
String |
getUsername(String originName)
return a username which doesn't duplicate with others
|
boolean |
isUsernameExist(String username)
ask if username is existing
|
void |
removeRelationship(String username)
remove books having relationship to username
|
void |
removeUsername(String username)
remove username
|
void |
setRelationship(String username,
Book book)
set relationship between username and book
|
protected static CollaborationInfo collaborationInfo
public static CollaborationInfo getInstance()
public void setRelationship(String username, Book book)
CollaborationInfo
setRelationship
in interface CollaborationInfo
public void removeRelationship(String username)
CollaborationInfo
removeRelationship
in interface CollaborationInfo
public boolean isUsernameExist(String username)
CollaborationInfo
isUsernameExist
in interface CollaborationInfo
public boolean addUsername(String username, String oldUsername)
CollaborationInfo
addUsername
in interface CollaborationInfo
public void removeUsername(String username)
CollaborationInfo
removeUsername
in interface CollaborationInfo
public Set<String> getUsedUsernames(String bookName)
CollaborationInfo
getUsedUsernames
in interface CollaborationInfo
public String getUsername(String originName)
CollaborationInfo
getUsername
in interface CollaborationInfo
public void addEvent(CollaborationInfo.CollaborationEventListener listener)
CollaborationInfo
addEvent
in interface CollaborationInfo
Copyright © 2020. All rights reserved.