com.softwareag.centrasite.appl.framework.lcm.impl
Class LCMAdminManagerImpl

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.lcm.impl.LCMAdminManagerImpl
All Implemented Interfaces:
LCMAdminManager

public class LCMAdminManagerImpl
extends java.lang.Object
implements LCMAdminManager

This implementation offers CRUD (Create, Read, Update, Delete) and searching functionality for a LCModel


Constructor Summary
LCMAdminManagerImpl(RegistryProvider registryProvider, BeanPool beanPool)
          Only constructor
 
Method Summary
 LCModel createLCModel()
          Creates an LCModel
 void deleteLCModel(LCModel lcModel)
          Deletes the given LCModel.
 java.util.Collection<LCModel> findAllModels()
          Find all LCModels that are currently within the scope (global or organizational specific) of the logged-in user.
 java.util.Collection<LCModel> findInactiveModels()
          Find all LCModels in the whole system that are not active
 LCModel findLCMForLCM()
          Finds the LCModel for LCModels.
 LCModel findLCModel(java.lang.String typeName)
          Find the LCModel that is active for for the given type If there are two LCModels active for the given type (one global and the other local), the global LCModel will be returned.
 java.util.List<LCModel> findLCModelByDisplayName(java.lang.String displayName, boolean activeModelsOnly)
          Find all LCModels that have the searched display name.
 LCModel getLCModel(java.lang.String lcModelKey)
          Get the LCModel with the given key
 void saveLCModel(LCModel lcModel)
          Saves the given LCModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LCMAdminManagerImpl

public LCMAdminManagerImpl(RegistryProvider registryProvider,
                           BeanPool beanPool)
                    throws CSAppFrameworkException
Only constructor

Parameters:
registryProvider -
beanPool -
Throws:
CSAppFrameworkException
Method Detail

createLCModel

public LCModel createLCModel()
                      throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Creates an LCModel

Specified by:
createLCModel in interface LCMAdminManager
Returns:
the new LCModel object
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

deleteLCModel

public void deleteLCModel(LCModel lcModel)
                   throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Deletes the given LCModel. An LCModel can be deleted only when it is not active

Specified by:
deleteLCModel in interface LCMAdminManager
Parameters:
lcModel - the lcModel to be deleted
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

saveLCModel

public void saveLCModel(LCModel lcModel)
                 throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Saves the given LCModel

Specified by:
saveLCModel in interface LCMAdminManager
Parameters:
lcModel - the LCModel to be saved
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

findAllModels

public java.util.Collection<LCModel> findAllModels()
                                            throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Find all LCModels that are currently within the scope (global or organizational specific) of the logged-in user.

Specified by:
findAllModels in interface LCMAdminManager
Returns:
all the LCModels as a collection, must not be null
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

findInactiveModels

public java.util.Collection<LCModel> findInactiveModels()
                                                 throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Find all LCModels in the whole system that are not active

Specified by:
findInactiveModels in interface LCMAdminManager
Returns:
the LCModels that are not active as a collection, must not be null
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

findLCMForLCM

public LCModel findLCMForLCM()
                      throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Finds the LCModel for LCModels. If two LCModel for LCModels, one local belonging to the organization of the logged in user and the other global are present, the global model is returned

Specified by:
findLCMForLCM in interface LCMAdminManager
Returns:
LCModel for LCModels
Throws:
CSAppFrameworkException

findLCModel

public LCModel findLCModel(java.lang.String typeName)
                    throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Find the LCModel that is active for for the given type If there are two LCModels active for the given type (one global and the other local), the global LCModel will be returned.

Specified by:
findLCModel in interface LCMAdminManager
Parameters:
typeName - the name of the type for which the LCModel has to be found
Returns:
LCModel with the given name, null if no LCModel found
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

getLCModel

public LCModel getLCModel(java.lang.String lcModelKey)
                   throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Get the LCModel with the given key

Specified by:
getLCModel in interface LCMAdminManager
Parameters:
lcModelKey - the key of the LCModel which LCModel has to be retrieved
Returns:
LCModel with the given key, null if no LCModel found
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error

findLCModelByDisplayName

public java.util.List<LCModel> findLCModelByDisplayName(java.lang.String displayName,
                                                        boolean activeModelsOnly)
                                                 throws CSAppFrameworkException
Description copied from interface: LCMAdminManager
Find all LCModels that have the searched display name.

Specified by:
findLCModelByDisplayName in interface LCMAdminManager
Parameters:
displayName - the name of the LCModel to be found
activeModelsOnly - if true - only active models will be searched, false - all models will be searched
Returns:
List with the given name, empty List if no LCModel found
Throws:
CSAppFrameworkException - - if the LCM provider encounters an internal error