interface Resource
AbstractResource
. The plugins cannot implement this interface,
so they should extend the AbstractResource
.Modifier and Type | Method and Description |
---|---|
void |
attach(SecurityManager sm)
Notifies the plugin about the instance of the Security Manager
to communicate with.
|
Description[] |
describeRights()
Returns an array of descriptions, one object per the plugin's access
rights item.
|
java.lang.Object |
getLibrary()
Returns the plugin's exported variables and functions.
|
Rights |
getRightsInstance(java.lang.Object[] rights)
Instantiates a plugin's class that implements the Rights interface,
using the array of objects representing a set of access rights fields.
|
java.lang.String |
getTypeName()
Returns the plugin resource type name as a string.
|
void |
init()
Gives chance to the plugin to initialize when all accounts are created.
|
boolean |
isInstanceNameValid(java.lang.String resource)
Checks whether a given string is a syntactically valid resource name
for this resource type.
|
boolean |
isRightsSetValid(java.lang.Object[] rights)
Checks whether a given array of objects representing a set of access
rights fields is acceptable.
|
void |
registeredAs(int res)
Notifies the plugin that the resource type has been assigned a numeric
value.
|
void attach(SecurityManager sm)
sm
- specifies an instance of SecurityManager
this
plugin should communicate withvoid init()
java.lang.String getTypeName()
java.lang.Object getLibrary()
null
if there is nothing to exportvoid registeredAs(int res)
res
- specifies the registration number for the resourceDescription[] describeRights()
Description
s, one per each plugin's access
rights item.Rights getRightsInstance(java.lang.Object[] rights)
rights
- an array of objects of proper types representing items in a set
of access rightsboolean isInstanceNameValid(java.lang.String resource)
resource
- string naming a resourcetrue
if the name is syntactically correctboolean isRightsSetValid(java.lang.Object[] rights)
rights
- an array of objects of proper types representing items in a set
of access rightstrue
if the array is acceptable for an instance
of access rights