Class LifeCyclePolicyImpl
java.lang.Object
org.opencastproject.lifecyclemanagement.impl.LifeCyclePolicyImpl
- All Implemented Interfaces:
LifeCyclePolicy
@Entity(name="LifeCyclePolicy")
public class LifeCyclePolicyImpl
extends Object
implements LifeCyclePolicy
Entity object for storing life cycle policies in persistence storage. Policies define actions that should be
applied to entities. They offer various methods of defining when an action should be applied, effectively
allowing for scheduling of actions.
The policy ACL only pertains to itself. The entities they may affect (e.g. events, series) are still only governed
by their own ACLs.
-
Constructor Summary
ConstructorsConstructorDescriptionLifeCyclePolicyImpl(String title, TargetType targetType, Action action, String actionParameters, Date actionDate, String cronTrigger, Timing timing, Map<String, Map<String, EventSearchQueryField<String>>> targetFilters, List<LifeCyclePolicyAccessControlEntryImpl> accessControlEntries) -
Method Summary
Modifier and TypeMethodDescriptionGets the access control entries restricting who may manage this policyGets the action to be performed when the policy is appliedGets the date at which the policy's action should be performedGets the parameters for the policy'sActionGets the cron expression that triggers the policy for aTiming.REPEATINGpolicygetId()Gets the policy's identifierGets the policy's organization identifierGets the filters used to determine which entities this policy targets.Gets the type of entity this policy targetsGets the policy'sTiminggetTitle()Gets the policy's titlebooleanisActive()Returns whether the policy is currently activebooleanReturns whether the policy was created from a configuration filevoidsetAccessControlEntries(List<LifeCyclePolicyAccessControlEntry> accessControlEntries) Sets the access control entries restricting who may manage this policyvoidSets the action to be performed when the policy is appliedvoidsetActionDate(Date actionDate) Sets the date at which the policy's action should be performedvoidsetActionParameters(String actionParameters) Sets the parameters for the policy'sActionvoidsetActive(boolean active) Sets whether the policy is currently activevoidsetCreatedFromConfig(boolean createdFromConfig) Sets whether the policy was created from a configuration filevoidsetCronTrigger(String cronTrigger) Sets the cron expression that triggers the policy for aTiming.REPEATINGpolicyvoidSets the policy's identifiervoidsetOrganization(String organization) Sets the policy's organization identifiervoidsetTargetFilters(Map<String, Map<String, EventSearchQueryField<String>>> targetFilters) Sets the filters used to determine which entities this policy targets.voidsetTargetType(TargetType targetType) Sets the type of entity this policy targetsvoidSets the policy'sTimingvoidSets the policy's title
-
Constructor Details
-
LifeCyclePolicyImpl
public LifeCyclePolicyImpl() -
LifeCyclePolicyImpl
public LifeCyclePolicyImpl(String title, TargetType targetType, Action action, String actionParameters, Date actionDate, String cronTrigger, Timing timing, Map<String, Map<String, EventSearchQueryField<String>>> targetFilters, List<LifeCyclePolicyAccessControlEntryImpl> accessControlEntries)
-
-
Method Details
-
getId
Description copied from interface:LifeCyclePolicyGets the policy's identifier- Specified by:
getIdin interfaceLifeCyclePolicy- Returns:
- the policy identifier
-
setId
Description copied from interface:LifeCyclePolicySets the policy's identifier- Specified by:
setIdin interfaceLifeCyclePolicy- Parameters:
id- the policy identifier
-
getOrganization
Description copied from interface:LifeCyclePolicyGets the policy's organization identifier- Specified by:
getOrganizationin interfaceLifeCyclePolicy- Returns:
- the organization identifier
-
setOrganization
Description copied from interface:LifeCyclePolicySets the policy's organization identifier- Specified by:
setOrganizationin interfaceLifeCyclePolicy- Parameters:
organization- the organization identifier
-
getTitle
Description copied from interface:LifeCyclePolicyGets the policy's title- Specified by:
getTitlein interfaceLifeCyclePolicy- Returns:
- the title
-
setTitle
Description copied from interface:LifeCyclePolicySets the policy's title- Specified by:
setTitlein interfaceLifeCyclePolicy- Parameters:
title- the title
-
getTargetType
Description copied from interface:LifeCyclePolicyGets the type of entity this policy targets- Specified by:
getTargetTypein interfaceLifeCyclePolicy- Returns:
- the
TargetType
-
setTargetType
Description copied from interface:LifeCyclePolicySets the type of entity this policy targets- Specified by:
setTargetTypein interfaceLifeCyclePolicy- Parameters:
targetType- theTargetType
-
getAction
Description copied from interface:LifeCyclePolicyGets the action to be performed when the policy is applied- Specified by:
getActionin interfaceLifeCyclePolicy- Returns:
- the
Action
-
setAction
Description copied from interface:LifeCyclePolicySets the action to be performed when the policy is applied- Specified by:
setActionin interfaceLifeCyclePolicy- Parameters:
action- theAction
-
getActionParameters
Description copied from interface:LifeCyclePolicyGets the parameters for the policy'sAction- Specified by:
getActionParametersin interfaceLifeCyclePolicy- Returns:
- the action parameters
-
setActionParameters
Description copied from interface:LifeCyclePolicySets the parameters for the policy'sAction- Specified by:
setActionParametersin interfaceLifeCyclePolicy- Parameters:
actionParameters- the action parameters
-
getActionDate
Description copied from interface:LifeCyclePolicyGets the date at which the policy's action should be performed- Specified by:
getActionDatein interfaceLifeCyclePolicy- Returns:
- the action date
-
setActionDate
Description copied from interface:LifeCyclePolicySets the date at which the policy's action should be performed- Specified by:
setActionDatein interfaceLifeCyclePolicy- Parameters:
actionDate- the action date
-
getCronTrigger
Description copied from interface:LifeCyclePolicyGets the cron expression that triggers the policy for aTiming.REPEATINGpolicy- Specified by:
getCronTriggerin interfaceLifeCyclePolicy- Returns:
- the cron trigger expression
-
setCronTrigger
Description copied from interface:LifeCyclePolicySets the cron expression that triggers the policy for aTiming.REPEATINGpolicy- Specified by:
setCronTriggerin interfaceLifeCyclePolicy- Parameters:
cronTrigger- the cron trigger expression
-
getTiming
Description copied from interface:LifeCyclePolicyGets the policy'sTiming- Specified by:
getTimingin interfaceLifeCyclePolicy- Returns:
- the timing
-
setTiming
Description copied from interface:LifeCyclePolicySets the policy'sTiming- Specified by:
setTimingin interfaceLifeCyclePolicy- Parameters:
timing- the timing
-
isActive
public boolean isActive()Description copied from interface:LifeCyclePolicyReturns whether the policy is currently active- Specified by:
isActivein interfaceLifeCyclePolicy- Returns:
- true if the policy is active
-
setActive
public void setActive(boolean active) Description copied from interface:LifeCyclePolicySets whether the policy is currently active- Specified by:
setActivein interfaceLifeCyclePolicy- Parameters:
active- true if the policy is active
-
isCreatedFromConfig
public boolean isCreatedFromConfig()Description copied from interface:LifeCyclePolicyReturns whether the policy was created from a configuration file- Specified by:
isCreatedFromConfigin interfaceLifeCyclePolicy- Returns:
- true if the policy was created from configuration
-
setCreatedFromConfig
public void setCreatedFromConfig(boolean createdFromConfig) Description copied from interface:LifeCyclePolicySets whether the policy was created from a configuration file- Specified by:
setCreatedFromConfigin interfaceLifeCyclePolicy- Parameters:
createdFromConfig- true if the policy was created from configuration
-
getTargetFilters
Description copied from interface:LifeCyclePolicyGets the filters used to determine which entities this policy targets. The outer map is keyed by metadata catalog flavor (e.g. "dublincore/episode"). The inner map hols the catalogs name/value pairs.- Specified by:
getTargetFiltersin interfaceLifeCyclePolicy- Returns:
- the target filters
-
setTargetFilters
Description copied from interface:LifeCyclePolicySets the filters used to determine which entities this policy targets. The outer map is keyed by metadata catalog flavor (e.g. "dublincore/episode"). The inner map hols the catalogs name/value pairs.- Specified by:
setTargetFiltersin interfaceLifeCyclePolicy- Parameters:
targetFilters- the target filters
-
getAccessControlEntries
Description copied from interface:LifeCyclePolicyGets the access control entries restricting who may manage this policy- Specified by:
getAccessControlEntriesin interfaceLifeCyclePolicy- Returns:
- the list of
LifeCyclePolicyAccessControlEntrys
-
setAccessControlEntries
Description copied from interface:LifeCyclePolicySets the access control entries restricting who may manage this policy- Specified by:
setAccessControlEntriesin interfaceLifeCyclePolicy- Parameters:
accessControlEntries- the list ofLifeCyclePolicyAccessControlEntrys
-