blob: 932c3587d9e0e9b3082b303051a27789468c5e8a [file] [log] [blame]
/********************************************************************************
* Copyright (c) 2015-2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
package org.eclipse.mdm.businessobjects.entity;
/**
* Attribute (Entity for attribute information)
*
* @author Juergen Kleck, Peak Solution GmbH
*
*/
public class MDMContextAttribute extends MDMAttribute {
/** The sort index of the template */
private final Integer sortIndex;
/** boolean flag if this attribute is readonly or writeable in edit mode */
private final Boolean readOnly;
/** boolean flag if this attribute is optional in edit mode */
private final Boolean optional;
/** description text of this attribute */
private final String description;
/**
* Constructor
*
* @param name name of the attribute value
* @param value value of the attribute value
* @param unit unit of the attribute value
* @param dataType data type of the attribute value
* @param sortIndex optional sort index of the attribute value
* @param readOnly optional flag if it is readonly in edit mode
* @param optional optional flag if it is optinal in edit mode
*/
public MDMContextAttribute(String name, Object value, String unit, String dataType, Integer sortIndex,
Boolean readOnly, Boolean optional, String description) {
super(name, value, unit, dataType);
this.sortIndex = sortIndex;
this.readOnly = readOnly;
this.optional = optional;
this.description = description;
}
public MDMContextAttribute(MDMAttribute attribute, Integer sortIndex, Boolean readOnly, Boolean optinal,
String description) {
super(attribute);
this.sortIndex = sortIndex;
this.readOnly = readOnly;
this.optional = optinal;
this.description = description;
}
public Integer getSortIndex() {
return sortIndex;
}
public Boolean getReadOnly() {
return readOnly;
}
public Boolean isOptional() {
return optional;
}
public String getDescription() {
return description;
}
}