public class ProfileController
extends java.lang.Object
Profile
s and provides a default
profile. Furthermore it provides a set of ProfileTemplate
s 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
Profile s. |
java.util.HashSet<ProfileController.ProfilePart> |
getProfilesWithPath(java.nio.file.Path file)
Returns a list of all
Profile s that contain a specific file.s |
java.util.HashSet<ProfileTemplate> |
getTemplates()
Getter for available templates
|
void |
loadTemplatesFrom(java.io.File templatesParentDirectory)
Loads all available
ProfileTemplate s from a specific directory. |
void |
remove(Profile profile)
Removes a
Profile form the application. |
void |
saveConfig()
Saves all
Profile s and ProfileTemplate s during
application shutdown. |
void |
setDefaultProfile(Profile profile)
Makes a
Profile the default profile. |
public final ExtractionController controller
ExtractionController
protected 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)
ProfileTemplate
s from a specific directory.templatesParentDirectory
- The path to the directory where the templates are stored.public Profile createProfile(java.lang.String name)
Profile
name
- 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()
Profile
s.public java.util.HashSet<ProfileController.ProfilePart> getProfilesWithPath(java.nio.file.Path file)
Profile
s that contain a specific file.sfile
- path to the filepublic void deleteAllMetadata()
public void saveConfig()
Profile
s and ProfileTemplate
s 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