Class LifeCyclePolicyScanner
java.lang.Object
org.opencastproject.lifecyclemanagement.impl.scanner.LifeCyclePolicyScanner
- All Implemented Interfaces:
org.apache.felix.fileinstall.ArtifactInstaller,org.apache.felix.fileinstall.ArtifactListener
public class LifeCyclePolicyScanner
extends Object
implements org.apache.felix.fileinstall.ArtifactInstaller
Loads, unloads, and reloads
LifeCyclePolicys from "*policy.yml" files in any of fileinstall's watch
directories.-
Field Summary
FieldsModifier and TypeFieldDescriptionAn internal collection of artifact id, bind the policy definition files and their idList of artifact parsed with errorprotected OrganizationDirectoryServiceprotected SecurityService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddLifeCycleService(LifeCycleService service) booleanvoidparseLifeCyclePolicyFile(File artifact) Parse the given lifecycle policy file and return the related lifecycle policyvoidAdd the given lifecycle policy to the installed lifecycle policy id.voidremoveLifeCyclePolicy(String identifier) Remove the lifecycle policy with the given id from the installed definition list.voidsetOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService) voidsetSecurityService(SecurityService securityService) voidvoid
-
Field Details
-
artifactIds
An internal collection of artifact id, bind the policy definition files and their id -
artifactsWithError
List of artifact parsed with error -
securityService
-
organizationDirectoryService
-
-
Constructor Details
-
LifeCyclePolicyScanner
public LifeCyclePolicyScanner()
-
-
Method Details
-
addLifeCycleService
-
setSecurityService
-
setOrganizationDirectoryService
public void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService) -
install
- Specified by:
installin interfaceorg.apache.felix.fileinstall.ArtifactInstaller- See Also:
-
uninstall
- Specified by:
uninstallin interfaceorg.apache.felix.fileinstall.ArtifactInstaller- See Also:
-
update
- Specified by:
updatein interfaceorg.apache.felix.fileinstall.ArtifactInstaller- See Also:
-
parseLifeCyclePolicyFile
Parse the given lifecycle policy file and return the related lifecycle policy- Parameters:
artifact- The lifecycle policy file to parse- Returns:
- the lifecycle policy if the given contained a valid one, or null if the file can not be parsed.
-
putLifeCyclePolicy
Add the given lifecycle policy to the installed lifecycle policy id.- Parameters:
policy- the lifecycle policy
-
removeLifeCyclePolicy
Remove the lifecycle policy with the given id from the installed definition list.- Parameters:
identifier- the lifecycle policy identifier
-
canHandle
- Specified by:
canHandlein interfaceorg.apache.felix.fileinstall.ArtifactListener- See Also:
-