/** * */ public class Policy extends DtoBase { @FilterName(ApiStrings.Policy.Arguments.POLICY_TYPE) @JsonProperty(ApiStrings.Policy.Arguments.POLICY_TYPE) public Long typeId; public String name; public String description; public JsonNode details; public Integer priority = 0; public String fingerprint; }
/** * The key for conditions. */ abstract public class ConditionKey extends DtoBase { @JsonProperty("name") public String name; @FilterName("type") @JsonProperty("type") public ConditionType conditionType; public String fingerprint; }
/** * Base class for core policy data transfer objects */ public class DtoBase { @FilterName(ApiStrings.BaseCrud.Arguments.ID) @JsonProperty(ApiStrings.BaseCrud.Arguments.ID) public Long id; @JsonIgnore private String projectId; public String getProjectId() { return projectId; } }
public static class Item extends DtoBase { // internal field, only put on by the hibernate annoation mapping layer, not seen by users, so shouldn't be in their filter/sort. public static final String WrapperFilterName = "sequence_workflow_entry"; @FilterName(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE_WORKFLOW_ID) public Long sequenceWorkflowId; @FilterName(WrapperFilterName) @SortName(WrapperFilterName) @HibernateWrappedItem("sequenceWorkflowEntry") public SequenceWorkflowEntry sequenceWorkflowEntry; } }
@FilterName("condition.id") public Long conditionId; @FilterName(CollectionWrapperFilterName) @HibernateWrappedItem("collection") public DocumentCollection collection = new DocumentCollection();
/** * Defines a Workflow which is made up of entries for sequences that comprise the workflow. */ public class SequenceWorkflow extends DtoBase { @FilterName(ApiStrings.SequenceWorkflow.Arguments.NAME) @JsonProperty(ApiStrings.SequenceWorkflow.Arguments.NAME) public String name; @JsonProperty(ApiStrings.SequenceWorkflow.Arguments.DESCRIPTION) public String description; @FilterName(ApiStrings.SequenceWorkflow.Arguments.SEQUENCE_ENTRIES) @SortName(ApiStrings.SequenceWorkflow.Arguments.SEQUENCE_ENTRIES) @JsonProperty(ApiStrings.SequenceWorkflow.Arguments.SEQUENCE_ENTRIES) public List<SequenceWorkflowEntry> sequenceWorkflowEntries = new LinkedList<>(); @JsonProperty(ApiStrings.SequenceWorkflow.Arguments.NOTES) public String notes; }
/** * Defines a single entry on a workflow */ public class SequenceWorkflowEntry extends DtoBase{ @FilterName(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE_ID) @JsonProperty(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE_ID) public Long collectionSequenceId; @JsonProperty(ApiStrings.SequenceWorkflowEntry.Arguments.ORDER) @SortName(ApiStrings.SequenceWorkflowEntry.Arguments.ORDER) public Short order; @FilterName(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE) @JsonProperty(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE) @SortName(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE) public CollectionSequence collectionSequence; @FilterName(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE_WORKFLOW_ID) @JsonProperty(ApiStrings.SequenceWorkflowEntry.Arguments.SEQUENCE_WORKFLOW_ID) public Long sequenceWorkflowId; }
/** * A condition that can be evaluated against a document */ //@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class") @JsonIgnoreProperties(ApiStrings.Conditions.Arguments.DESC) public abstract class Condition extends ConditionKey { @FilterName(ApiStrings.Conditions.Arguments.IS_FRAGMENT) @JsonProperty(ApiStrings.Conditions.Arguments.IS_FRAGMENT) public boolean isFragment; public Integer order; public ConditionTarget target = ConditionTarget.CONTAINER; @JsonProperty(ApiStrings.Conditions.Arguments.INCLUDE_DESCENDANTS) public Boolean includeDescendants = false; @FilterName(ApiStrings.Conditions.Arguments.NOTES) @SortName(ApiStrings.Conditions.Arguments.NOTES) public String notes; @JsonProperty(ApiStrings.Conditions.Arguments.PARENT_CONDITION_ID) public Long parentConditionId; }
/** * */ public class CollectionSequenceEntry { @FilterName(ApiStrings.CollectionSequenceEntries.Arguments.COLLECTION_IDS) @SortName(ApiStrings.CollectionSequenceEntries.Arguments.COLLECTION_IDS) @JsonProperty(ApiStrings.CollectionSequenceEntries.Arguments.COLLECTION_IDS) public Set<Long> collectionIds = new HashSet<>(); @JsonProperty(ApiStrings.CollectionSequenceEntries.Arguments.ORDER) public Short order; @JsonProperty(ApiStrings.CollectionSequenceEntries.Arguments.STOP_ON_MATCH) public Boolean stopOnMatch = false; @JsonIgnore public String fingerprint; }
@FilterName(ApiStrings.CollectionSequences.Arguments.NAME) @SortName(ApiStrings.CollectionSequences.Arguments.NAME) @JsonProperty(ApiStrings.CollectionSequences.Arguments.NAME) public String name; @FilterName(ApiStrings.CollectionSequences.Arguments.DESCRIPTION) @SortName(ApiStrings.CollectionSequences.Arguments.DESCRIPTION) @JsonProperty(ApiStrings.CollectionSequences.Arguments.DESCRIPTION) public Boolean fullConditionEvaluation = false; @FilterName(ApiStrings.CollectionSequences.Arguments.COLLECTION_SEQUENCE_ENTRIES) public DateTime lastModified; @FilterName(ApiStrings.CollectionSequences.Arguments.EVALUATION_ENABLED) @JsonProperty(ApiStrings.CollectionSequences.Arguments.EVALUATION_ENABLED) public boolean evaluationEnabled = true; //CAF-544 says the default should be true