Class SPLsManager
- java.lang.Object
-
- net.ssehub.easy.producer.core.mgmt.SPLsManager
-
- All Implemented Interfaces:
IInstantiatorProjectManager
public class SPLsManager extends java.lang.Object implements IInstantiatorProjectManager
This class manages all available ProductLineProjects.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description static SPLsManagerINSTANCEprivate static EASyLoggerFactory.EASyLoggerLOGGERprivate java.util.HashMap<java.lang.String,PLPInfo>plProjectsID and reference for foundPLPInfos.
-
Constructor Summary
Constructors Modifier Constructor Description privateSPLsManager()Constructor for the singelton.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPLP(PLPInfo plp)Adds a new product line project to the list of available product lines.PLPInfogetPLP(java.lang.String projectID)Returns PLP by given UUID.java.lang.StringgetPLPName(java.lang.String projectID)Returns the Name of a PLP by given ID.java.util.HashMap<java.lang.String,PLPInfo>getProductLineProjects()Returns a copy of the current productline-projects-map.java.lang.StringgetProjectPath(java.lang.String projectID)Returns the path of the project.voidremovePLP(java.lang.String projectID)Removes a project from the list of currently available product lines.private voidresetHashMaps()Clears all stored configuration paths and plp information.
-
-
-
Field Detail
-
INSTANCE
public static final SPLsManager INSTANCE
-
LOGGER
private static final EASyLoggerFactory.EASyLogger LOGGER
-
-
Method Detail
-
resetHashMaps
private void resetHashMaps()
Clears all stored configuration paths and plp information.- Since:
- 21.04.2012
-
addPLP
public void addPLP(PLPInfo plp)
Adds a new product line project to the list of available product lines. This method should be used when the persistence layer reads the configuration file.- Parameters:
plp- The Product Line Project which should be added to the list.
-
removePLP
public void removePLP(java.lang.String projectID)
Removes a project from the list of currently available product lines. Additionally removes references of predecessors and successors- Parameters:
projectID- The ID of the project, which should be removed.
-
getProductLineProjects
public java.util.HashMap<java.lang.String,PLPInfo> getProductLineProjects()
Returns a copy of the current productline-projects-map. A 2-tuple in the form of (projectID, PLP).- Returns:
- Copy of pl_projects
-
getProjectPath
public java.lang.String getProjectPath(java.lang.String projectID)
Description copied from interface:IInstantiatorProjectManagerReturns the path of the project.- Specified by:
getProjectPathin interfaceIInstantiatorProjectManager- Parameters:
projectID- The ID of the project, which should be returned.- Returns:
- The absolute path in the filesystem for this project.
-
getPLPName
public java.lang.String getPLPName(java.lang.String projectID)
Description copied from interface:IInstantiatorProjectManagerReturns the Name of a PLP by given ID.- Specified by:
getPLPNamein interfaceIInstantiatorProjectManager- Parameters:
projectID- The ID of the project, which name should be returned.- Returns:
- the name of the PLP
-
getPLP
public PLPInfo getPLP(java.lang.String projectID)
Description copied from interface:IInstantiatorProjectManagerReturns PLP by given UUID.- Specified by:
getPLPin interfaceIInstantiatorProjectManager- Parameters:
projectID- The ID of the project, which should be returned.- Returns:
- The PLP, or null, if there is no valid reference in same workspace
-
-