Class ProjectCreator
- java.lang.Object
-
- net.ssehub.easy.producer.eclipse.persistency.project_creation.ProjectCreator
-
public class ProjectCreator extends java.lang.ObjectCreates a new Project with the given parameters.- Author:
- El-Sharkawy, Kapeluch, Nowatzki
-
-
Field Summary
Fields Modifier and Type Field Description private booleanlazyprivate static EASyLoggerFactory.EASyLoggerLOGGERprivate java.lang.Stringprojectname
-
Constructor Summary
Constructors Constructor Description ProjectCreator(java.lang.String projectname)Default constructor for this class.ProjectCreator(java.lang.String projectname, boolean lazy)Use this constructor in case, if you don't want to open a configuration window.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductLineProjectderiveNewMember(java.lang.String predecessor, IEASyProjectConfigurator... configurators)Creates a new productline member with all necessarily files and folders.ProductLineProjectnewPLP(IEASyProjectConfigurator... configurators)Creates a new product line project with all necessarily files and folders.static booleanprojectExists(java.lang.String projectname)Tests whether a given projectname already exists inside the workspace.
-
-
-
Field Detail
-
LOGGER
private static final EASyLoggerFactory.EASyLogger LOGGER
-
projectname
private java.lang.String projectname
-
lazy
private boolean lazy
-
-
Constructor Detail
-
ProjectCreator
public ProjectCreator(java.lang.String projectname) throws ProjectAlreadyExistsException, InvalidProjectnameExceptionDefault constructor for this class.- Parameters:
projectname- The name of the new project- Throws:
ProjectAlreadyExistsException- If the project which should be created already exists.InvalidProjectnameException- If the projectname is not valid.
-
ProjectCreator
public ProjectCreator(java.lang.String projectname, boolean lazy) throws ProjectAlreadyExistsException, InvalidProjectnameExceptionUse this constructor in case, if you don't want to open a configuration window. This constructor is for automated testing.- Parameters:
projectname- The name of the new projectlazy- iftrue, create only required parts, else assume that project does not exist before- Throws:
ProjectAlreadyExistsException- If the project which should be created already exists.InvalidProjectnameException- If the project which should be created has a non-valid name.
-
-
Method Detail
-
deriveNewMember
public ProductLineProject deriveNewMember(java.lang.String predecessor, IEASyProjectConfigurator... configurators)
Creates a new productline member with all necessarily files and folders. The new created project will be a successor of an existing project. This method acts as a frontend for#deriveNewPLP(String).- Parameters:
configurators- Optional list of configurators to configure the newly created project, maybe null. The configurators will be applied in the ordering of the array.predecessor- On predecessor of the new project- Returns:
- The newly created product line project
- See Also:
newPLP(IEASyProjectConfigurator...)
-
newPLP
public ProductLineProject newPLP(IEASyProjectConfigurator... configurators)
Creates a new product line project with all necessarily files and folders.- Parameters:
configurators- Optional list of configurators to configure the newly created project, maybe null. The configurators will be applied in the ordering of the array.- Returns:
- The newly created product line project
- See Also:
deriveNewMember(String, IEASyProjectConfigurator...)
-
projectExists
public static boolean projectExists(java.lang.String projectname)
Tests whether a given projectname already exists inside the workspace.- Parameters:
projectname- A new projectname to test- Returns:
- true if the project already exists, otherwise false
-
-