public class ProfileController
extends java.lang.Object
Profiles and provides a default
profile. Furthermore it provides a set of ProfileTemplates to allow a
fast creation of a predefined Profile.| Modifier and Type | Class and Description |
|---|---|
protected class |
ProfileController.ProfilePart
Utility data structure to manage a file (
Part) that belongs to a
specific . |
| Modifier and Type | Field and Description |
|---|---|
ExtractionController |
controller
The applications
ExtractionController |
| Modifier | Constructor and Description |
|---|---|
protected |
ProfileController(ExtractionController controller)
Constructor of ProfileController will be called by the
ExtractionController. |
| Modifier and Type | Method and Description |
|---|---|
void |
addTemplate(ProfileTemplate template)
Add a newly created template (profile -> export as template) to the list
of templates
|
Profile |
createProfile(java.lang.String name)
Creates a new
Profile |
Profile |
createProfileFromTemplate(ProfileTemplate template)
Creates a new
Profile from a ProfileTemplate. |
void |
deleteAllMetadata()
Deletes all extracted information.
|
Profile |
getDefaultProfile()
Returns the default profile (the only profile that does always exist)
|
Profile |
getProfile(java.lang.String UUID)
Returns a
Profile with a specific UUID |
java.util.HashSet<Profile> |
getProfiles()
Returns a list of all current
Profiles. |
java.util.HashSet<ProfileController.ProfilePart> |
getProfilesWithPath(java.nio.file.Path file)
Returns a list of all
Profiles that contain a specific file.s |
java.util.HashSet<ProfileTemplate> |
getTemplates()
Getter for available templates
|
void |
loadTemplatesFrom(java.io.File templatesParentDirectory)
Loads all available
ProfileTemplates from a specific directory. |
void |
remove(Profile profile)
Removes a
Profile form the application. |
void |
saveConfig()
Saves all
Profiles and ProfileTemplates during
application shutdown. |
void |
setDefaultProfile(Profile profile)
Makes a
Profile the default profile. |
public final ExtractionController controller
ExtractionControllerprotected ProfileController(ExtractionController controller)
ExtractionController. Saved profiles and templates will be loaded
and the default profile created.controller - The applications ExtractionControllerpublic void loadTemplatesFrom(java.io.File templatesParentDirectory)
ProfileTemplates from a specific directory.templatesParentDirectory - The path to the directory where the templates are stored.public Profile createProfile(java.lang.String name)
Profilename - the name of the new profilepublic Profile createProfileFromTemplate(ProfileTemplate template)
Profile from a ProfileTemplate.template - The template that serves to create the profilepublic void remove(Profile profile)
Profile form the application.profile - Profile to be removed.public Profile getProfile(java.lang.String UUID)
Profile with a specific UUIDUUID - the UUID of the returned profilepublic Profile getDefaultProfile()
public java.util.HashSet<Profile> getProfiles()
Profiles.public java.util.HashSet<ProfileController.ProfilePart> getProfilesWithPath(java.nio.file.Path file)
Profiles that contain a specific file.sfile - path to the filepublic void deleteAllMetadata()
public void saveConfig()
Profiles and ProfileTemplates during
application shutdown.public void setDefaultProfile(Profile profile)
Profile the default profile.profile - public java.util.HashSet<ProfileTemplate> getTemplates()
public void addTemplate(ProfileTemplate template)
template - ProfileTemplate to be added