public class ExtServiceDiscoItem extends RepositoryItemAbstract
ADMINS_ATT, ADMINS_LABEL, OWNER_ATT, OWNER_LABEL| Constructor and Description |
|---|
ExtServiceDiscoItem() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandFields(Packet packet)
The method is used for handling ad-hoc commands.
|
String[] |
getAdmins()
Returns an array with the Item administrators, that is people IDs who can manage, configure and control less
critical elements of the Item, like changing less critical configuration settings.
|
String |
getElemName() |
String |
getKey()
Returns a unique key for the item in the repository.
|
String |
getOwner()
Returns the owner ID of the item.
|
String |
getType() |
void |
initFromCommand(Packet packet)
The method used for handling ad-hoc commands.
|
void |
initFromElement(Element elem)
The item can be also initialized from a more complex repositories: XML repository or SQL database.
|
void |
initFromPropertyString(String propString)
The item can be initialized based on the data loaded from a configuration file.
|
boolean |
isAdmin(String id)
The method checks whether the given id is one of the administrators set for the Item.
|
boolean |
isOwner(String id)
The method checks whether the person with given ID is the Item owner.
|
void |
setAdmins(String[] admins)
Returns an array with the Item administrators, that is people IDs who can manage, configure and control less
critical elements of the Item, like changing less critical configuration settings.
|
protected void |
setKey(String key) |
void |
setOwner(String owner)
Set the Item owner.
|
Element |
toElement()
Item data can be stored in a more complex form than a simple property string.
|
String |
toPropertyString()
The item can be initialized based on the data loaded from a configuration file.
|
public void addCommandFields(Packet packet)
RepositoryItemaddCommandFields in interface RepositoryItemaddCommandFields in class RepositoryItemAbstractpacket - with empty ad-hoc command to fill with fieldspublic String[] getAdmins()
RepositoryItemgetAdmins in interface RepositoryItemgetAdmins in class RepositoryItemAbstractpublic void setAdmins(String[] admins)
RepositoryItemsetAdmins in interface RepositoryItemsetAdmins in class RepositoryItemAbstractadmins - is an array with the Item administrators IDs to set for the Item.public String getElemName()
getElemName in class RepositoryItemAbstractpublic String getKey()
RepositoryItemprotected void setKey(String key)
setKey in class RepositoryItemAbstractpublic String getOwner()
RepositoryItemgetOwner in interface RepositoryItemgetOwner in class RepositoryItemAbstractpublic void setOwner(String owner)
RepositoryItemsetOwner in interface RepositoryItemsetOwner in class RepositoryItemAbstractowner - is the Item owner ID.public String getType()
public void initFromCommand(Packet packet)
RepositoryIteminitFromCommand in interface RepositoryIteminitFromCommand in class RepositoryItemAbstractpacket - with ad-hoc command filled by the user.public void initFromElement(Element elem)
RepositoryIteminitFromElement in interface RepositoryIteminitFromElement in class RepositoryItemAbstractelem - XML Element with all the item initialization data.public void initFromPropertyString(String propString)
RepositoryItempropString - is a property string to initialize the RepositoryItem.public boolean isAdmin(String id)
RepositoryItemisAdmin in interface RepositoryItemisAdmin in class RepositoryItemAbstractid - is an ID of a person for which we check access permissions.public boolean isOwner(String id)
RepositoryItemisOwner in interface RepositoryItemisOwner in class RepositoryItemAbstractid - is an ID of a person for whom we check access permissions.public Element toElement()
RepositoryItemtoElement in interface RepositoryItemtoElement in class RepositoryItemAbstractpublic String toPropertyString()
RepositoryItemCopyright © 2004–2021 "Tigase, Inc.". All rights reserved.