
org.xlcloud.console.entitlements.AbstractEntitlementDictionary Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2012 AMG.lab, a Bull Group Company
*
* 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.
*/
package org.xlcloud.console.entitlements;
/**
* Abstract representation of entitlement dictionary.
* @author "Konrad Król", AMG.net
*/
public abstract class AbstractEntitlementDictionary implements EntitlementDictionary {
private Long id;
private String description;
/**
* Constructor for the AbstractEntitlementDictionary.
* Note that, if the parent dictionary is provided, this entitlement is automatically
* assigned to the parent dictionary:
* {@link CompositeEntitlementDictionary#addIncludedEntitlementDictionary(EntitlementDictionary)}
*
* @param id id of the entitlement dictionary
* @param description description
* @param parent parent dictionary
*/
public AbstractEntitlementDictionary(Long id, String description, CompositeEntitlementDictionary parent) {
this.id = id;
this.description = description;
if(parent != null) {
parent.addIncludedEntitlementDictionary(this);
}
}
/**
* @param id id of the entitlement dictionary
* @param description description
*/
public AbstractEntitlementDictionary(Long id, String description) {
this.id = id;
this.description = description;
}
/** {@inheritDoc} */
@Override
public Long getId() {
return id;
}
/** {@inheritDoc} */
@Override
public void setId(Long id) {
this.id = id;
}
/** {@inheritDoc} */
@Override
public String getDescription() {
return description;
}
/** {@inheritDoc} */
@Override
public void setDescription(String description) {
this.description = description;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy