public abstract class RepositoryItemAbstract extends Object implements RepositoryItem
| Modifier and Type | Field and Description |
|---|---|
static String |
ADMINS_ATT
Field description
|
static String |
ADMINS_LABEL
Field description
|
static String |
OWNER_ATT
Field description
|
static String |
OWNER_LABEL
Field description
|
| Constructor and Description |
|---|
RepositoryItemAbstract() |
| 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.
|
abstract String |
getElemName()
Method description
|
String |
getOwner()
Returns the owner ID of the item.
|
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.
|
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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKey, initFromPropertyString, toPropertyStringpublic static final String ADMINS_ATT
public static final String ADMINS_LABEL
public static final String OWNER_ATT
public static final String OWNER_LABEL
public abstract String getElemName()
public void addCommandFields(Packet packet)
RepositoryItemaddCommandFields in interface RepositoryItempacket - with empty ad-hoc command to fill with fieldspublic String[] getAdmins()
RepositoryItemgetAdmins in interface RepositoryItempublic String getOwner()
RepositoryItemgetOwner in interface RepositoryItempublic void initFromCommand(Packet packet)
RepositoryIteminitFromCommand in interface RepositoryItempacket - with ad-hoc command filled by the user.public void initFromElement(Element elem)
RepositoryIteminitFromElement in interface RepositoryItemelem - XML Element with all the item initialization data.public boolean isAdmin(String id)
RepositoryItemisAdmin in interface RepositoryItemid - is an ID of a person for which we check access permissions.public boolean isOwner(String id)
RepositoryItemisOwner in interface RepositoryItemid - is an ID of a person for whom we check access permissions.public void setAdmins(String[] admins)
RepositoryItemsetAdmins in interface RepositoryItemadmins - is an array with the Item administrators IDs to set for the Item.public void setOwner(String owner)
RepositoryItemsetOwner in interface RepositoryItemowner - is the Item owner ID.public Element toElement()
RepositoryItemtoElement in interface RepositoryItemCopyright © 2018 "Tigase, Inc.". All rights reserved.