Package com.denodo.configuration.manager
Interface ConfigurationManager
- All Known Implementing Classes:
AbstractConfigurationManagerImpl
public interface ConfigurationManager
-
Method Summary
Modifier and TypeMethodDescriptionadd(int projectID, Configuration config) Creates a new element using the given configuration and associates it to the specified project.add(Configuration config) Creates a new element using the given configuration.get(int elementID) Obtains the configuration of the given element.Obtains the configuration of the given element.Obtains the configuration of the given element.Obtains the configuration of the given element.getBySubType(int projectID, String type, String subType) Gets the collection of elements of the given type and subType associated to the specified project.getBySubType(String type, String subType) Gets the collection of elements of the given type and subType.getBySubTypeGroupedByProject(String type, String subType) Gets the collection of elements of the given type and subType.getElementsUsedByElement(int elementID) getProjectsBySubType(String type, String subType) Gets the project name and id the elements of the given type and subType belong to.voidremove(int elementID) Removes the element with the specified identifier.voidremoveByProject(int projectID) Removes all the application elements associated to the given project.voidremoveBySubType(String type, String subType) Removes all the application elements of the given type and subType.replicateElement(int projectID, String newName, Configuration config) Creates a new element using the given new name and existing configuration and associates it to the specified project.update(Configuration config) Modifies the configuration of the element.
-
Method Details
-
add
Creates a new element using the given configuration.- Parameters:
config- the configuration of the new element.- Returns:
- the
Configuration. - Throws:
DuplicateInstanceException- if an element with the same name already exists.InternalErrorException- if an error occurs during the process.
-
add
Configuration add(int projectID, Configuration config) throws DuplicateInstanceException, InternalErrorException Creates a new element using the given configuration and associates it to the specified project. Also updates the project configuration with the new element.- Parameters:
projectID- the name of the project.config- the configuration of the new element.- Returns:
- the
Configuration. - Throws:
DuplicateInstanceException- if an element with the same name already exists.InternalErrorException- if an error occurs during the process.
-
replicateElement
Configuration replicateElement(int projectID, String newName, Configuration config) throws DuplicateInstanceException, InternalErrorException Creates a new element using the given new name and existing configuration and associates it to the specified project. Also updates the project configuration with the new element.- Parameters:
projectID- the name of the project.newName- the name for the replicated element.config- the configuration of element to be replicated.- Returns:
- the
Configuration. - Throws:
DuplicateInstanceException- if an element with the same name already exists.InternalErrorException- if an error occurs during the process.
-
get
Obtains the configuration of the given element.- Parameters:
elementID- identifier of the element.- Returns:
- the
Configuration. - Throws:
InstanceNotFoundException- if no element with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
getByName
Configuration getByName(String name, String type) throws InstanceNotFoundException, InternalErrorException Obtains the configuration of the given element.- Parameters:
name- name of the element.type- type of the required element.- Returns:
- the
Configuration. - Throws:
InstanceNotFoundException- if no element with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
getByName
Configuration getByName(int projectID, String name, String type) throws InstanceNotFoundException, InternalErrorException Obtains the configuration of the given element.- Parameters:
projectID- identifier of the project.name- name of the elementtype- the type of the elements required.- Returns:
- the
Configuration. - Throws:
InstanceNotFoundException- if no element meeting the requirements could be found.InternalErrorException- if an error occurs during the process.
-
getByName
Configuration getByName(String projectName, String name, String type) throws InstanceNotFoundException, InternalErrorException Obtains the configuration of the given element.- Parameters:
projectName- name of the project.name- name of the elementtype- the type of the elements required.- Returns:
- the
Configuration. - Throws:
InstanceNotFoundException- if no element meeting the requirements could be found.InternalErrorException- if an error occurs during the process.
-
getBySubType
Collection<Configuration> getBySubType(int projectID, String type, String subType) throws InternalErrorException Gets the collection of elements of the given type and subType associated to the specified project.- Parameters:
projectID- identifier of the project.type- the type of the elements required. If is null the subType parameter is ignored and a getByProjectID operation is performed.subType- the subType of the elements required. If is null a getByType operation is performed.- Returns:
- a Collection of
Configuration. - Throws:
InternalErrorException- if an error occurs during the process.
-
getBySubType
Gets the collection of elements of the given type and subType.- Parameters:
type- the type of the elements required. If is null the subType parameter is ignored and a getAll operation is performed.subType- the subType of the elements required. If is null a getByType operation is performed.- Returns:
- a Collection of
Configuration. - Throws:
InternalErrorException- if an error occurs during the process.
-
getBySubTypeGroupedByProject
Map<Integer,Collection<Integer>> getBySubTypeGroupedByProject(String type, String subType) throws InternalErrorException Gets the collection of elements of the given type and subType.- Parameters:
type- the type of the elements required.subType- the subType of the elements required. If is null a getByType operation is performed.- Returns:
- a Map <Integer, Collection>. The key is the project identifier
and its value is the Collection
of element identifiers matching the given type and subType. - Throws:
InternalErrorException- if an error occurs during the process.
-
getProjectsBySubType
Map<Integer,Map<Integer, getProjectsBySubTypeString>> (String type, String subType) throws InternalErrorException Gets the project name and id the elements of the given type and subType belong to.- Parameters:
type- the type of the elements required.subType- the subType of the elements required. If is null a getByType operation is performed.- Returns:
- a Map <Integer, Map>. The key is the element identifier and its value is a map with the project identifier and name it belongs to.
- Throws:
InternalErrorException- if an error occurs during the process.
-
update
Configuration update(Configuration config) throws DuplicateInstanceException, InstanceNotFoundException, InternalErrorException Modifies the configuration of the element. Also updates the project configuration if the element name is modified.- Parameters:
config- the configuration of the element.- Returns:
- the
Configuration. - Throws:
DuplicateInstanceException- if the element name is modified and an element with the same name already exists.InstanceNotFoundException- if the element does not exist.InternalErrorException- if an error occurs during the process.
-
remove
Removes the element with the specified identifier. Also updates the project configuration removing the element from it.- Parameters:
elementID- the identifier of the project.- Throws:
InstanceNotFoundException- if no element with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
removeByProject
Removes all the application elements associated to the given project. Also updates the project configuration removing the elements from it.- Parameters:
projectID-- Throws:
InternalErrorException- if an error occurs during the process.
-
removeBySubType
Removes all the application elements of the given type and subType. Also updates the project configuration removing the elements from it.- Parameters:
type- the type of the elements required.subType- the subType of the elements required. If is null a removeByType operation is performed.- Throws:
InternalErrorException- if an error occurs during the process.
-
getElementsUsedByElement
Map<String,Set<Configuration>> getElementsUsedByElement(int elementID) throws InstanceNotFoundException, InternalErrorException - Parameters:
elementID-- Returns:
- Throws:
InstanceNotFoundExceptionInternalErrorException
-