org.syncope.client.mod.AbstractAttributableMod Maven / Gradle / Ivy
/*
* 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.
* under the License.
*/
package org.syncope.client.mod;
import java.util.HashSet;
import java.util.Set;
import org.syncope.client.AbstractBaseBean;
public abstract class AbstractAttributableMod extends AbstractBaseBean {
protected long id;
protected Set attributesToBeUpdated;
protected Set attributesToBeRemoved;
protected Set derivedAttributesToBeAdded;
protected Set derivedAttributesToBeRemoved;
protected Set resourcesToBeAdded;
protected Set resourcesToBeRemoved;
public AbstractAttributableMod() {
attributesToBeUpdated = new HashSet();
attributesToBeRemoved = new HashSet();
derivedAttributesToBeAdded = new HashSet();
derivedAttributesToBeRemoved = new HashSet();
resourcesToBeAdded = new HashSet();
resourcesToBeRemoved = new HashSet();
}
public boolean addAttributeToBeRemoved(String attribute) {
return attributesToBeRemoved.add(attribute);
}
public boolean removeAttributeToBeRemoved(String attribute) {
return attributesToBeRemoved.remove(attribute);
}
public Set getAttributesToBeRemoved() {
return attributesToBeRemoved;
}
public void setAttributesToBeRemoved(Set attributesToBeRemoved) {
this.attributesToBeRemoved = attributesToBeRemoved;
}
public boolean addAttributeToBeUpdated(AttributeMod attribute) {
return attributesToBeUpdated.add(attribute);
}
public boolean removeAttributeToBeUpdated(AttributeMod attribute) {
return attributesToBeUpdated.remove(attribute);
}
public Set getAttributesToBeUpdated() {
return attributesToBeUpdated;
}
public void setAttributesToBeUpdated(
Set attributesToBeUpdated) {
this.attributesToBeUpdated = attributesToBeUpdated;
}
public boolean addDerivedAttributeToBeAdded(String derivedAttribute) {
return derivedAttributesToBeAdded.add(derivedAttribute);
}
public boolean removeDerivedAttributeToBeAdded(String derivedAttribute) {
return derivedAttributesToBeAdded.remove(derivedAttribute);
}
public Set getDerivedAttributesToBeAdded() {
return derivedAttributesToBeAdded;
}
public void setDerivedAttributesToBeAdded(
Set derivedAttributesToBeAdded) {
this.derivedAttributesToBeAdded = derivedAttributesToBeAdded;
}
public boolean addDerivedAttributeToBeRemoved(String derivedAttribute) {
return derivedAttributesToBeRemoved.add(derivedAttribute);
}
public boolean removeDerivedAttributeToBeRemoved(String derivedAttribute) {
return derivedAttributesToBeRemoved.remove(derivedAttribute);
}
public Set getDerivedAttributesToBeRemoved() {
return derivedAttributesToBeRemoved;
}
public void setDerivedAttributesToBeRemoved(
Set derivedAttributesToBeRemoved) {
this.derivedAttributesToBeRemoved = derivedAttributesToBeRemoved;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public boolean addResourceToBeAdded(String resource) {
return resourcesToBeAdded.add(resource);
}
public boolean removeResourceToBeAdded(String resource) {
return resourcesToBeAdded.remove(resource);
}
public Set getResourcesToBeAdded() {
return resourcesToBeAdded;
}
public void setResourcesToBeAdded(Set resourcesToBeAdded) {
this.resourcesToBeAdded = resourcesToBeAdded;
}
public boolean addResourceToBeRemoved(String resource) {
return resourcesToBeRemoved.add(resource);
}
public boolean removeResourceToBeRemoved(String resource) {
return resourcesToBeRemoved.remove(resource);
}
public Set getResourcesToBeRemoved() {
return resourcesToBeRemoved;
}
public void setResourcesToBeRemoved(Set resourcesToBeRemoved) {
this.resourcesToBeRemoved = resourcesToBeRemoved;
}
}