ARoad0.AcsAddon.Accbee.Ubuntu.gBase
Class BaseUtilityUbuntuImpl

java.lang.Object
  extended by ARoad0.gBase.BaseUtilityImpl
      extended by ARoad0.AcsAddon.Accbee.Ubuntu.gBase.BaseUtilityUbuntuImpl
All Implemented Interfaces:
Singleton

public class BaseUtilityUbuntuImpl
extends BaseUtilityImpl

This class is a utility class for the Ubuntu ACS, with only static methods. It provides synchronized methods to copy, get a BaseObject or a BeanInfo, and mainly handle rights and right operations. The calls to this class are reserved to the classes of this package, even if its methods are public since they override the super methods. Caution: this class is not defined in ACSFactoryUtilityImpl.M_GENERIC_ACS_VOCABULARY, then it is not possible to get it outside this package through ARoad0.gBaseInterface.ACSRun.getM_AcsVocabulary(). This class has no subclass in this package.


Field Summary
private static java.util.Set<StringRight> l_denyRightsForLinuxStickybit__
           
private static java.util.Set<StringRight> l_rightsForLinuxStickybit__
           
 
Fields inherited from class ARoad0.gBase.BaseUtilityImpl
INITIAL_CAPACITY, instance__
 
Constructor Summary
BaseUtilityUbuntuImpl()
          Public constructor
 
Method Summary
protected static java.util.Set<StringRight> getChildRightsSetFromParentAGORights(StringRight[] _l_parentRights, ImmutableACS _acs)
          Gets the child inherited rights from the AGO directory rights, for the children.
static java.util.Set<StringRight> getDeleteRenameRights(ImmutableACS _acs)
          This method allows to implement the 'sticky bit' management for Directories.
static java.util.Set<StringRight> getDenyDeleteRenameRights(ImmutableACS _acs)
          This method allows to implement the 'sticky bit' management for Directories.
static BaseUtilityImpl getInstance()
          Only method to obtain the unique instance of BaseUtilityUbuntuImpl.
static java.util.Set<StringRight> subtractUMask(java.util.Set<StringRight> _l_Rights, ImmutableACS _acs, ImmutableResource _res, java.lang.String _maskType)
          This method allows to implement the 'umask' management for Resources.
static boolean withAcrossToDirectoryAGRights(StringRight[] _l_rights)
          Analyze the directory rights to say if the AGO inherited rights which are derived from the directory rights allow some access to the child.
 
Methods inherited from class ARoad0.gBase.BaseUtilityImpl
addObjectInDecreasingSort, addRightInDecreasingSort, copyDirectoriesAndActorsWithoutInternalAcl, copyDirectoriesAndResources, copyDirectoryChildren, copyDirectoryChildrenForACS, copyGroupsTree, copyOrAddGroupMembers, getAcsNameFromName, getAllIndirectGroupMembers, getAllIndirectGroupMembersAndRunningUnderActors, getBaseObjectTrueName, getBeanInfoNameForISnode, getChildRightsFromParentAGRights, getChildRightsSetFromParentAGRights, getClassicSuperInterfacesFromBeanInfo, getEorBaseObject, getFromKownACS, getL_AcsRestrictedRights, getL_AcsRestrictedTypes, getL_AcsSpecializedRights, getNoDisplayThisRightProperty, getRestrictedValues, getRightFromNameAsString, isAcsRightName, isExternalACSobject, removeSpacesInString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

l_rightsForLinuxStickybit__

private static java.util.Set<StringRight> l_rightsForLinuxStickybit__

l_denyRightsForLinuxStickybit__

private static java.util.Set<StringRight> l_denyRightsForLinuxStickybit__
Constructor Detail

BaseUtilityUbuntuImpl

public BaseUtilityUbuntuImpl()
Public constructor

Method Detail

getInstance

public static BaseUtilityImpl getInstance()
Only method to obtain the unique instance of BaseUtilityUbuntuImpl.

Returns:
a BaseUtilityUbuntuImpl instance

withAcrossToDirectoryAGRights

public static boolean withAcrossToDirectoryAGRights(StringRight[] _l_rights)
Analyze the directory rights to say if the AGO inherited rights which are derived from the directory rights allow some access to the child. Return true if the Directory AGO rights contain an equivalent to the metaright 'execute_for_directory', or if the method of the superclass returns true. Overrides the superclass method. Called by the Resource constructor, Directory.setL_ownerRights() and setL_groupRights().

Parameters:
_l_rights - rights of a Directory
Returns:
true if the rights allow an access to the Directory children

getDeleteRenameRights

public static java.util.Set<StringRight> getDeleteRenameRights(ImmutableACS _acs)
This method allows to implement the 'sticky bit' management for Directories. Called by ResourceImplUbuntu.setL_groupRights() and CAgoUserImplUbuntu.setL_otherRights().

Parameters:
_acs - to process. May be null.
Returns:
the set of the 6 positive deleting and renaming metarights, or their equivallnts as acsrights if they exist in the argument. Never null.

getDenyDeleteRenameRights

public static java.util.Set<StringRight> getDenyDeleteRenameRights(ImmutableACS _acs)
This method allows to implement the 'sticky bit' management for Directories. Called by ResourceImplUbuntu.setL_inheritedGroupRights() and CAgoUserImplUbuntu.setL_inheritedOtherRights() constructor.

Parameters:
_acs - to process. May be null.
Returns:
the set of the 6 negative deleting and renaming metarights, or their equivalents as acsrights if they exist in the not-null _acs. Never null.

subtractUMask

public static java.util.Set<StringRight> subtractUMask(java.util.Set<StringRight> _l_Rights,
                                                       ImmutableACS _acs,
                                                       ImmutableResource _res,
                                                       java.lang.String _maskType)
This method allows to implement the 'umask' management for Resources. Subtracts the umask denying AGO rights from a set. The NX ACS is detected when its type contains ACSImpl.LINUX or ACSImpl.UNIX. If _l_Rights is empty, return an empty set. Calls UserIDUbuntu.processUMask() and super.subtractNegativeNotRemovingInOneACS(). If the _res userID is null, returns the subtraction of the negative rights in _l_Rights, if any, to the positive rights in the same _l_Rights.

Parameters:
_l_Rights - positive or negative rights to process. Not null and no null item. May be empty.
_acs - uses all the rights in the two right sets. May be null.
_res - the Resource on which the returned rights are applied. Never null.
_maskType - is for AGO rights 'owner', 'group' or 'other'. Never null.
Returns:
the set of positive rights. May be empty, not null.

getChildRightsSetFromParentAGORights

protected static java.util.Set<StringRight> getChildRightsSetFromParentAGORights(StringRight[] _l_parentRights,
                                                                                 ImmutableACS _acs)
Gets the child inherited rights from the AGO directory rights, for the children. Calls directly the superclass method. Called by CAgoUserUbuntuImpl.getL_inheritedGroup/OtherRights().

Parameters:
_l_parentRights - acsrights or metarights of a directory. Never null.
_acs - of the Resource calling this method. Never null.
Returns:
the child rights, without the rights in _l_parentRights which are not directory rights. May be an empty set but not null.