com.adobe.acs.commons.workflow.bulk.removal.WorkflowRemovalConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of acs-aem-commons-bundle Show documentation
Show all versions of acs-aem-commons-bundle Show documentation
Main ACS AEM Commons OSGi Bundle. Includes commons utilities.
/*
* #%L
* ACS AEM Commons Bundle
* %%
* Copyright (C) 2015 Adobe
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package com.adobe.acs.commons.workflow.bulk.removal;
import java.util.Calendar;
import java.util.Collection;
import java.util.regex.Pattern;
public final class WorkflowRemovalConfig {
private final Collection modelIds;
private final Collection statuses;
private final Collection payloads;
private final Calendar olderThan;
private final long olderThanMillis;
private int batchSize = 1000;
private int maxDurationInMins = 0;
/**
* Config for workflow removal instances that match the parameter criteria.
*
* @param modelIds WF Models to remove
* @param statuses WF Statuses to remove
* @param payloads Regexes; WF Payloads to remove
* @param olderThan UTC time in milliseconds; only delete WF's started after this time
* @param olderThanMillis Milliseconds; only delete WF's started after this milliseconds ago
*/
public WorkflowRemovalConfig(Collection modelIds, Collection statuses, Collection payloads, Calendar olderThan, long olderThanMillis) {
this.modelIds = modelIds;
this.statuses = statuses;
this.payloads = payloads;
this.olderThan = olderThan;
this.olderThanMillis = olderThanMillis;
}
public final Collection getModelIds() {
return modelIds;
}
public final Collection getStatuses() {
return statuses;
}
public final Collection getPayloads() {
return payloads;
}
public final Calendar getOlderThan() {
return olderThan;
}
public final long getOlderThanMillis() {
return olderThanMillis;
}
public final int getBatchSize() {
return batchSize;
}
public final int getMaxDurationInMins() {
return maxDurationInMins;
}
public final void setBatchSize(int batchSize) {
this.batchSize = batchSize;
}
public final void setMaxDurationInMins(int maxDurationInMins) {
this.maxDurationInMins = maxDurationInMins;
}
}