ARoad0.gWork
Class AcsFactory

java.lang.Object
  extended by ARoad0.gWork.AcsFactory
All Implemented Interfaces:
Singleton

public class AcsFactory
extends java.lang.Object
implements Singleton

This class is an utility class for the creation of the standard ACS which are configured by code, like the RBAC application. It uses the class ARoad0.gBase.ACSFactoryImpl for creating the ACS in the base. It offers only public static methods. This class has several subclasses in the AcsAddon packages, and they implements the interfaces Pattern.Singleton and Pattern.AcsFactoryForAcsAddon. this class has no variables.


Constructor Summary
AcsFactory()
          with this public constructor for the subclasses.
 
Method Summary
static ACS configureRBAC(ACSImpl _result, ACS _core)
          Creates the elements of the RBAC application ACS.
static void configureRBAConLinux(ImmutableName _name, ACS _core, ACSFactoryImpl _factory)
          Creates the roots of the RBAC application on the Impl ACS.
static ACS configureTestForVFandPRI(ACSImpl _result)
          Creates the elements of the ACS test for VirtualFolders and Privileges.
static ACS configureTestOfAll(ACSImpl _result)
          Creates the elements of the ACS test for VirtualFolders and Privileges.
static ACSImpl createApache(ACSImpl _result, ACS _core)
          Creates the elements of the Apache ACS.
static ACSImpl createRBAC(ImmutableName _name, java.lang.String _type, ACSImpl _core)
          Creates an ACS with the type Role-Based Access Control application.
static ACSImpl createTestForVFandPRI(ImmutableName _iSname, ImmutableName _name, java.lang.String _type, ImmutableName _parent)
          Creates a specific ACS to test the VirtualFolders and the Privileges.
static ACSImpl createTestOfAll(ImmutableName _iSname, ImmutableName _name, java.lang.String _type, ImmutableName _parent)
          Creates a specific ACS to test all the options for the structure, the types, the constraints in an ACS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcsFactory

public AcsFactory()
with this public constructor for the subclasses.

Method Detail

createRBAC

public static ACSImpl createRBAC(ImmutableName _name,
                                 java.lang.String _type,
                                 ACSImpl _core)
                          throws BaseError
Creates an ACS with the type Role-Based Access Control application. Calls configureRBAConLinux(). configureRBAC() is called after this method by ActionNewACSyst.fillWithAcsObjects().

Parameters:
_name - ImmutableName for the ACS to create. No test of null value nor empty.
_type - is 'RBAC application'.
_core - is the core ACS (for instance, the operating system) on which the new ACS is build up. May be null.
Returns:
the new ACS
Throws:
BaseError - if the ACS is not known, the ACS is open, the open ACS has not the same name, the core ACS is null when it is mandatory, or ClassNotFoundException, IOException with invalidClassException if ACSImpl HAS CHANGED, or if the type or the specified structure are not correct.

createTestForVFandPRI

public static ACSImpl createTestForVFandPRI(ImmutableName _iSname,
                                            ImmutableName _name,
                                            java.lang.String _type,
                                            ImmutableName _parent)
                                     throws BaseError
Creates a specific ACS to test the VirtualFolders and the Privileges. This ACS has Resources, Directories, Actors, UserIDs, VirtualFolders for Resources and EligibleParty Resources, TypedPrivileges, internal and external LinkedPrivileges. It has no Groups, AGO rights, AclEntries. configureTestForVFandPRI() is called after this method by ActionNewACSyst.fillWithAcsObjects().

Parameters:
_iSname - the IS of the new ACS. May be null.
_name - of the ACS to create. No test of null value nor empty.
_type - must be 'An ACS for testing VirtualFolders and Privileges'
_parent - is the parent node of the new ACS in the IS. Never null.
Returns:
the new ACS
Throws:
BaseError - if the ACS is known, the ACS is open, the core ACS is null when it is mandatory, or ClassNotFoundException, IOException with invalidClassException if ACSImpl HAS CHANGED, or if the type or the specified structure are not correct.

createTestOfAll

public static ACSImpl createTestOfAll(ImmutableName _iSname,
                                      ImmutableName _name,
                                      java.lang.String _type,
                                      ImmutableName _parent)
                               throws BaseError
Creates a specific ACS to test all the options for the structure, the types, the constraints in an ACS. This ACS has Resources, Directories, Actors, UserIDs, GroupIDs, tree of GroupIDs, VirtualFolders for Resources and EP Resources. It has TypedPrivileges and LinkedPrivileges, AGO rights without 'other' rights, internal and external AclEntries, Bridges. It has no Resource SubACS, and one Group SubACS. configureTestOfAll() is called after this method by ActionNewACSyst.fillWithAcsObjects().

Parameters:
_iSname - the IS of the new ACS. May be null.
_name - of the ACS to create. No test of null value nor empty.
_type - must be 'An ACS for testing AG/ACL/PRI rights and AG inheritance'
_parent - is the parent node of the new ACS in the IS. Never null.
Returns:
the new ACS
Throws:
BaseError - if the ACS is known, the ACS is open, the core ACS is null when it is mandatory, or ClassNotFoundException, IOException with invalidClassException if ACSImpl HAS CHANGED, or if the type or the specified structure are not correct.

configureRBAC

public static final ACS configureRBAC(ACSImpl _result,
                                      ACS _core)
Creates the elements of the RBAC application ACS. Creates a resources tree with directories, leaves, and the group trees. Called by ActionNewACSyst.fillWithAcsObjects().

Parameters:
_result - to construct
_core - the core ACS of _result
Returns:
ACS with the initial and standard trees of resources and eligible parties.
Throws:
java.lang.InternalError - if the method fails

configureTestForVFandPRI

public static final ACS configureTestForVFandPRI(ACSImpl _result)
Creates the elements of the ACS test for VirtualFolders and Privileges.

Parameters:
_result - to construct
Returns:
ACS with the initial and standard trees of resources, eligible parties.

configureTestOfAll

public static final ACS configureTestOfAll(ACSImpl _result)
Creates the elements of the ACS test for VirtualFolders and Privileges. Note: since the AGO 'other' rights are not activated in this strange 'Linux' ACS, the inherited AGO rights are very restricted; to have an AGO right, the same account or group must be applicable for each directory in the parent path.

Parameters:
_result - to construct
Returns:
ACS with the initial and standard trees of resources, eligible parties.

createApache

public static final ACSImpl createApache(ACSImpl _result,
                                         ACS _core)
Creates the elements of the Apache ACS. Under Linux: GroupIDMembers are: www-data group Creates a resources tree with directories, leaves and executables (then actors):

Parameters:
_result - to construct
_core - is the foundation on which _result is build up. Noop if its type is not "Linux 8.04 Desktop".
Returns:
ACS with the initial and standard trees of resources, eligible parties.

configureRBAConLinux

public static final void configureRBAConLinux(ImmutableName _name,
                                              ACS _core,
                                              ACSFactoryImpl _factory)
Creates the roots of the RBAC application on the Impl ACS. They are only opening and closing roots. Creates the account '_nameLastComponent_appli' and the group '_nameLastComponent_group'. Creates a resources tree with directories, leaves and executables (then actors). Called by createRBAC().

Parameters:
_name - ImmutableName for the ACS to create. No test of null value nor empty.
_core - is the Linux on which the application is building up, and it is updated by the initial and standard trees of resources and eligible parties of the RBAC application
_factory - the RBAC ACS factory