|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resource
This interface is responsible for modeling a resource in an ACS. The resource may have a parent in a resource tree in this ACS, and may be the alias of an EligibleParty of another ACS.
As a general resource it is accessed from EligibleParties (userID, groupID, actor) through AclEntries belonging to this ACS or to another one. As a resource with AGO rights, it has an userID (account) and a groupID (group) in this ACS, and rights for them. The Resource is a PrivilegeTarget. This interface has several subinterfaces in this package. Directories, files, executable progams are examples of resources. The resource is automatically registered in at most one ACS (the main one) plus others (the controllers). So, finalizeForUser() HAVE TO BE CALLED BEFORE DELETING the resource.
It is a javabean with the following bound properties: 'Comment', 'AclEntries', 'UserID', 'GroupID', 'RootRights', 'OtherRights', 'GroupRights', 'OwnerRights', 'EPsThroughAclEntry', 'AcsControllers', and from the subclasses in the AcsAddon, 'InheritedTargetPrivileges', 'InheritedTargetAclEntries'. The listeners are proper to this instance, outside gBase, transient (not serialized in this instance backup), and they are called in any order. As a BaseBeanManager, fire closing/deleting events on AclEntries.
Method Summary | |
---|---|
AclEntry |
addAclEntry(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
StringRight[] _right,
java.lang.Boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Creates a new aclEntry which delivers rights to an eligible party to access or to deny access to this resource. |
java.lang.Object |
copyWithoutInternalAcl(ImmutableName _name,
ACS _acs,
Directory _parent,
java.lang.Boolean _toRegisterInManager)
This method provides a copy of the instance as Copyable.copy(), but without copying the internal aclEntries. |
void |
removeAclEntry(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Deletes an aclEntry which delivers rights to an eligible party to access or to deny access to this resource. |
void |
resetInheritedAclEntryRights(AclEntry _acl)
Resets the inherited AclEntry rights after an user edition. |
void |
resetInheritedPrivilegeRights(PrivilegeForLinks _lpri)
Resets the inherited Privilege rights after an user edition. |
PrivilegeForLinks |
selectInheritedPrivilege(PrivilegeForLinks _lpri,
java.lang.String _type)
Returns the Privilege to use as inherited Privilege in a child. |
void |
setEorGroupID(ImmutableGroupID _g)
Defines the group owning this resource. |
void |
setEorUserID(ImmutableUserID _u)
Set the userID of the resource, and set the current userID in the own actors if it was the previous userID. |
void |
setL_groupRights(StringRight[] _s)
Set the rights for the members of the groupID which owns this resource. |
void |
setL_ownerRights(StringRight[] _s)
Sets the rights for the account which owns this resource. |
void |
setL_rootRights(StringRight[] _s)
Sets the rights for the userID 'root'. |
void |
setResourceType(java.lang.String _st)
If _st is allowed by the ACS, set the type of this resource. |
Methods inherited from interface ARoad0.gBaseInterface.Basic |
---|
finalizeForUser, setComment |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableBasic |
---|
getComment, getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getImpliedViews, getIS_Name, getL_AcsOfSoftReferences, getL_SoftAlias, getPropertyChangeListeners, getSerialVersionUID, getVirtualFolders |
Methods inherited from interface ARoad0.gBaseInterface.Copyable |
---|
copy |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeTarget |
---|
addEorPrivilegeForTypeToTarget, removeEorPrivilegeToTarget |
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilegeTarget |
---|
getEorImmutableL_TargetInheritedLinkedPrivileges, getEorL_TargetPrivilegeForLinks, getEorL_TargetPrivilegeForTypes, getEorL_TargetPrivileges, getM_TargetInheritedLinkedPRIRights, getType |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias |
Methods inherited from interface ARoad0.gBaseInterface.ACSObject |
---|
getAcsName, getEorACS |
Methods inherited from interface ARoad0.gBaseInterface.BaseObject |
---|
equals, getFullName, getName, getNickName, hashCode |
Method Detail |
---|
void setEorGroupID(ImmutableGroupID _g) throws UpDateError
_g
- ImmutableGroupID which owns this resource, in the main ACS.
UpDateError
- if _g does not belong to the main ACS of this resource.void setEorUserID(ImmutableUserID _u) throws UpDateError
_u
- owns this resource, in the main ACS. May be null.
UpDateError
- if _u does not belong to this resource main ACS.void setL_ownerRights(StringRight[] _s) throws UpDateError
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the owner rights are immutable.void setL_groupRights(StringRight[] _s) throws UpDateError
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the group rights are immutable.void setL_rootRights(StringRight[] _s) throws UpDateError
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the root rights are immutable.void setResourceType(java.lang.String _st) throws UpDateError
_st
- type of the resource.
UpDateError
- if the type is null, equal to AclEntry addAclEntry(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, StringRight[] _right, java.lang.Boolean _positiveRight, ImmutableGroupID _conditionGroup) throws CreateError
_aclAcs
- ImmutableACS which owns the new AclEntry, and to be recorded
as an ACS controller of this resource if it is not its main ACS._ep
- eligible party connected to the resource through a new aclEntry._right
- is an string array of positive or negative rights of _ep on this resource
(that is, if READ is a right, _ep can read on the resource). May be null._positiveRight
- is true if the rights are set to authorize (grant),
and false if they are set to forbid (deny)._conditionGroup
- first condition group. May be null.
java.lang.InternalError
- if this resource has a null name or a null ACS,
or if _ep is not an EligiblePartyImpl nor an ActorImpl.
CreateError
- if _ep or _aclAcs is null, or if _ep is already recorded
in this resource with the same ACS, or thrown by the ACS.newEorAclEntry().void removeAclEntry(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, boolean _positiveRight, ImmutableGroupID _conditionGroup) throws UpDateError
_aclAcs
- ImmutableACS which owns the AclEntry, and is recorded
as an ACS controller of this resource._ep
- eligible party connected to the resource through an AclEntry.
This method unrecords the relevant aclEntry in _ep, in this resource,
and in the relevant ACS. The ACS of the aclEntry may be unrecorded in this
resource if there are no other aclEntry owned by this ACS in this resource._positiveRight
- is true if the rights are oriented to authorize,
and false if they are oriented to forbid._conditionGroup
- first condition group. May be null.
UpDateError
- if _ep is null, unknown, or if _aclAcs is closed or unknown.void resetInheritedAclEntryRights(AclEntry _acl)
_acl
- inherited AclEntry with updated rightsvoid resetInheritedPrivilegeRights(PrivilegeForLinks _lpri)
_lpri
- inherited Privilege with updated rights. Never null.PrivilegeForLinks selectInheritedPrivilege(PrivilegeForLinks _lpri, java.lang.String _type)
selectInheritedPrivilege
in interface ImmutablePrivilegeTarget
_lpri
- the initial Privilege which may be given to the child_type
- type of a child, as Resource
java.lang.Object copyWithoutInternalAcl(ImmutableName _name, ACS _acs, Directory _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
_name
- copy name. Usually creates as an extension of _parent name._acs
- main ACS of the copy to create. May not be the ACS
of this instance._parent
- DirectoryImpl which belongs to _acs and will have the copy.
May be null. Must be null for some implementations._toRegisterInManager
- false if this method must not register
the instance in the ACS.
CreateError
- of the constructor with the same parameters,
or if _parent ACS is not _acs, or addAclEntry() exceptions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |