org.wso2.carbon.registry.admin.api.governance
Interface ILifecycleManagementService<LifecycleConfigurationBean>

Type Parameters:
LifecycleConfigurationBean - a bean that can be used to manage a lifecycle configuration. Please note that a lifecycle configuration can be modified only if it is not currently being used.

public interface ILifecycleManagementService<LifecycleConfigurationBean>

This provides functionality to manage various lifecycle (or aspects which are lifecycles) configurations on the registry.


Method Summary
 boolean createLifecycle(LifecycleConfigurationBean bean)
          Method to create a new lifecycle configuration.
 boolean deleteLifecycle(String name)
          Method to delete an existing lifecycle configuration.
 LifecycleConfigurationBean getLifecycleBean(String name)
          Method to obtain a configuration bean for the given lifecycle.
 String getLifecycleConfiguration(String name)
          Method to obtain the lifecycle configuration of the given lifecycle.
 String[] getLifecycleList()
          Method to obtain a list of currently configured lifecycles.
 String getLifecyclesCollectionLocation()
          Method to obtain the location on the repository where lifecycle configurations are stored.
 boolean isLifecycleNameInUse(String name)
          Method to determine whether the lifecycle configuration by the given name is currently being used.
 LifecycleConfigurationBean parseConfiguration(String configuration)
          Method to parse the given lifecycle configuration XML and generate a lifecycle configuration bean.
 void setLifecyclesCollectionLocation(String location)
          Method to set the location on the repository where lifecycle configurations are stored.
 boolean updateLifecycle(String oldName, LifecycleConfigurationBean bean)
          Method to update an existing lifecycle configuration.
 

Method Detail

getLifecyclesCollectionLocation

String getLifecyclesCollectionLocation()
                                       throws Exception
Method to obtain the location on the repository where lifecycle configurations are stored.

Returns:
the location on the repository where lifecycle configurations are stored.
Throws:
Exception - if the operation failed.

setLifecyclesCollectionLocation

void setLifecyclesCollectionLocation(String location)
                                     throws Exception
Method to set the location on the repository where lifecycle configurations are stored.

Parameters:
location - the location on the repository where lifecycle configurations are stored.
Throws:
Exception - if the operation failed.

getLifecycleList

String[] getLifecycleList()
                          throws Exception
Method to obtain a list of currently configured lifecycles.

Returns:
the list of lifecycles.
Throws:
Exception - if the operation failed.

getLifecycleBean

LifecycleConfigurationBean getLifecycleBean(String name)
                                            throws Exception
Method to obtain a configuration bean for the given lifecycle.

Parameters:
name - the name of the lifecycle configuration.
Returns:
the corresponding lifecycle configuration bean.
Throws:
Exception - if the operation failed.

getLifecycleConfiguration

String getLifecycleConfiguration(String name)
                                 throws Exception
Method to obtain the lifecycle configuration of the given lifecycle.

Parameters:
name - the name of the lifecycle configuration.
Returns:
the corresponding lifecycle configuration XML.
Throws:
Exception - if the operation failed.

createLifecycle

boolean createLifecycle(LifecycleConfigurationBean bean)
                        throws Exception
Method to create a new lifecycle configuration.

Parameters:
bean - the lifecycle configuration bean. The name of the lifecycle will be determined from the provided configuration.
Returns:
whether the operation was successful or not.
Throws:
Exception - if the operation failed due to an unexpected error.

updateLifecycle

boolean updateLifecycle(String oldName,
                        LifecycleConfigurationBean bean)
                        throws Exception
Method to update an existing lifecycle configuration.

Parameters:
oldName - the name of the existing lifecycle configuration.
bean - the lifecycle configuration bean containing the updated configuration. if the new lifecycle configuration has a new name, the old lifecycle configuration will be deleted and a new one will be added. If the names were the same, the existing configuration will be updated instead.
Returns:
whether the operation was successful or not.
Throws:
Exception - if the operation failed due to an unexpected error.

deleteLifecycle

boolean deleteLifecycle(String name)
                        throws Exception
Method to delete an existing lifecycle configuration.

Parameters:
name - the name of the existing lifecycle configuration to be deleted.
Returns:
whether the operation was successful or not.
Throws:
Exception - if the operation failed due to an unexpected error.

isLifecycleNameInUse

boolean isLifecycleNameInUse(String name)
                             throws Exception
Method to determine whether the lifecycle configuration by the given name is currently being used.

Parameters:
name - the name of an existing lifecycle configuration.
Returns:
if the given lifecycle configuration is being used this method will return 'true'. If not, this method will return 'false'.
Throws:
Exception - if the operation failed.

parseConfiguration

LifecycleConfigurationBean parseConfiguration(String configuration)
                                              throws Exception
Method to parse the given lifecycle configuration XML and generate a lifecycle configuration bean.

Parameters:
configuration - the configuration of the lifecycle in XML.
Returns:
a bean corresponding to the given configuration.
Throws:
Exception - if the operation failed.


Copyright © 2011 WSO2 Inc. All Rights Reserved.