* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.sdc.be.datatypes.enums;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.ToString;
+@AllArgsConstructor
+@Getter
+@ToString(onlyExplicitlyIncluded = true)
public enum JsonPresentationFields {
-
+ // @formatter:off
UNIQUE_ID("uniqueId", GraphPropertyEnum.UNIQUE_ID),
HIGHEST_VERSION("highestVersion", GraphPropertyEnum.IS_HIGHEST_VERSION),
LIFECYCLE_STATE("lifecycleState", GraphPropertyEnum.STATE),
DERIVED_FROM("derivedFrom", null),
VENDOR_NAME("vendorName", null),
VENDOR_RELEASE("vendorRelease", null),
+ CATEGORY("category", null),
+ SUB_CATEGORY("subcategory", null),
+ RESOURCE_VENDOR("resourceVendor", null),
+ RESOURCE_VENDOR_RELEASE("resourceVendorRelease", null),
RESOURCE_VENDOR_MODEL_NUMBER("reourceVendorModelNumber", null),
SERVICE_TYPE("serviceType", null),
SERVICE_ROLE("serviceRole", null),
INVARIANT_UUID("invariantUuid", GraphPropertyEnum.INVARIANT_UUID),
CSAR_UUID("csarUuid", GraphPropertyEnum.CSAR_UUID),
CSAR_VERSION("csarVersion", null),
+ CSAR_VERSION_ID("csarVersionId", null),
IMPORTED_TOSCA_CHECKSUM("importedToscaChecksum", null),
CONTACT_ID("contactId", null),
PROJECT_CODE("projectCode", null),
DISTRIBUTION_STATUS("distributionStatus", GraphPropertyEnum.DISTRIBUTION_STATUS),
DERIVED_FROM_GENERIC_TYPE("derivedFromGenericType", null),
DERIVED_FROM_GENERIC_VERSION("derivedFromGenericVersion", null),
+ SERVICE_FUNCTION("serviceFunction", null),
+ MODEL("model", null),
+ NORMATIVE("normative", null),
+ DATA_TYPES("data_types", GraphPropertyEnum.DATA_TYPES),
+ TENANT("tenant", null),
////Inputs
ANNOTATIONS("annotations", null),
-
////Artifact
ARTIFACT_TYPE("artifactType", null),
ARTIFACT_REF("artifactRef", null),
HEAT_PARAMETERS("heatParameters", null),
GENERATED_FROM_ID("generatedFromId", null),
-
// end artifacts
-
//property
DEFINITION("definition", null),
DEFAULT_VALUE("defaultValue", null),
+ DEFAULT("default", null),
REQUIRED("required", null),
PASSWORD("password", null),
CONSTRAINTS("constraints", null),
PROPERTIES("properties", null),
PROPERTY("property", null),
SCHEMA("schema", null),
+ ENTRY_SCHEMA("entry_schema", null),
VALUE("value", null),
PARENT_UNIQUE_ID("parentUniqueId", null),
CAPABILITY_SOURCES("capabilitySources", null),
MAX_OCCURRENCES("maxOccurrences", null),
MIN_OCCURRENCES("minOccurrences", null),
- OWNER_TYPE("ownerType",null),
+ OWNER_TYPE("ownerType", null),
OWNER_NAME("ownerName", null),
OWNER_ID("ownerId", null),
LEFT_OCCURRENCES("leftOccurences", null),
SOURCE("source", null),
//Requirement
- CAPAPILITY("capability", null),
+ CAPABILITY("capability", null),
NODE("node", null),
RELATIONSHIP("relationship", null),
VALID_SOURCE_TYPES("validSourceTypes", null),
+ VALID_TARGET_TYPES("validTargetTypes", null),
REQUIREMENT_ID("requirementId", null),
PARENT_NAME("parentName", null),
PREVIOUS_NAME("previousName", null),
+ NODE_FILTER_CAPABILITIES("capabilities", null),
+ PROPERTY_FILTER_NAME("propertyName", null),
+ PROPERTY_FILTER_CONSTRAINT("propertyFilterConstraint", null),
+ EQUAL_CONSTRAINT("equal", null),
+ CONSTRAINT_VALUE("constraintValue", null),
+ CONSTRAINT_FUNCTION("constraintFunction", null),
+ NODE_FILTER("nodeFilter", null),
+ TOSCA_ID("tosca_id", null),
+
//Relation
CAPABILTY_OWNER_ID("capabilityOwnerId", null),
REQUIREMENT_OWNER_ID("requirementOwnerId", null),
FROM_ID("fromId", null),
TO_ID("toId", null),
REQUIREMENT("requirement", null),
- ORIGIN_UI("originUI",null),
+ ORIGIN_UI("originUI", null),
//Groups
-
GROUP_INVARIANT_UUID("invariantUUID", null),
GROUP_UUID("groupUUID", null),
GROUP_MEMBER("members", null),
GROUP_INSTANCE_PROPERTIES("groupInstancesProperties", null),
//Component instance
-
CI_COMPONENT_UID("componentUid", null),
CI_POS_X("posX", null),
CI_POS_Y("posY", null),
CI_SOURCE_MODEL_INVARIANT("sourceModelInvariant", null),
CI_SOURCE_MODEL_NAME("sourceModelName", null),
CI_IS_PROXY("isProxy", null),
-
+ CI_DIRECTIVES("directives", null),
+ CI_ARTIFACTS("artifacts", null),
+ CI_MAX_OCCURRENCES("maxOccurrences", null),
+ CI_MIN_OCCURRENCES("minOccurrences", null),
+ CI_INSTANCE_COUNT("instanceCount", null),
//path
FORWARDING_PATH("forwardingPath", null),
TARGETS("targets", null),
//External Refs
- EXTERNAL_REF("externalRef", null),
- CREATED_FROM("createdFrom", null),
-
+ EXTERNAL_REF("externalRef", null), CREATED_FROM("createdFrom", null),
//Archive
IS_ARCHIVED("isArchived", GraphPropertyEnum.IS_ARCHIVED),
ARCHIVE_TIME("archiveTime", GraphPropertyEnum.ARCHIVE_TIME),
CI_IS_ORIGIN_ARCHIVED("isOriginArchived", null),
//Interface Operation
+ IO_OPERATION_TYPE("operationType", null),
+ IO_INPUT_PARAMETERS("inputParams", null),
+ IO_OUTPUT_PARAMETERS("outputParams", null),
+ IO_PARAM_NAME("paramName", null),
+ IO_PARAM_ID("paramId", null),
+ IO_NAME("name", null),
+ IO_MANDATORY("mandatory", null),
+ IO_TYPE("type", null),
+ IO_PROPERTY("property", null),
+ IO_WORKFLOW_NAME("workflowName", null),
+ IO_WORKFLOW_VERSION("workflowVersion", null),
IO_WORKFLOW_ID("workflowId", null),
IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
IO_WORKFLOW_ASSOCIATION_TYPE("workflowAssociationType", null),
+
+ //Interface
INTERFACES("interfaces", null),
+ INTERFACE_INPUT("input", null),
OPERATIONS("operations", null),
- OPERATION_IMPLEMENTATION("implementation",null),
- OPERATION_INPUTS("inputs",null),
- OPERATION_OUTPUTS("outputs", null);
-
- private String presentation;
- private GraphPropertyEnum storedAs;
-
- JsonPresentationFields(String presentation, GraphPropertyEnum storedAs) {
- this.presentation = presentation;
- this.storedAs = storedAs;
- }
-
- @JsonValue
- public String getPresentation() {
- return presentation;
- }
-
- public void setPresentation(String presentation) {
- this.presentation = presentation;
- }
-
- public GraphPropertyEnum getStoredAs() {
- return storedAs;
- }
-
- public void setStoredAs(GraphPropertyEnum storedAs) {
- this.storedAs = storedAs;
- }
+ OPERATION_IMPLEMENTATION("implementation", null),
+ OPERATION_INPUTS("inputs", null),
+ OPERATION_OUTPUTS("outputs", null),
+ OPERATION_MILESTONES("milestones", null),
+ OPERATION_FILTERS("filters", null),
+ OPERATION_ACTIVITIES("activities", null),
+ OPERATION_ACTIVITIES_WORKFLOW("workflow", null),
+ INPUTS("inputs", null),
+
+ GET_PROPERTY("get_property", null),
+ GET_INPUT("get_input", null),
+ GET_OPERATION_OUTPUT("get_operation_output", null),
+
+ ATTRIBUTES("attributes", null),
+
+ TEMPLATE_VERSION("template_version", null),
+ TOSCA_DEFINITIONS_VERSION("tosca_definitions_version", null);
+ // @formatter:on
+
+ @ToString.Include
+ private final String presentation;
+ @ToString.Exclude
+ private final GraphPropertyEnum storedAs;
public static String getPresentationByGraphProperty(GraphPropertyEnum property) {
for (JsonPresentationFields currPresentation : JsonPresentationFields.values()) {
return null;
}
- @Override
- public String toString() {
- // TODO Auto-generated method stub
- return presentation;
- }
-
@JsonCreator
public static JsonPresentationFields getByPresentation(String presentation) {
for (JsonPresentationFields inst : JsonPresentationFields.values()) {
return null;
}
+ @JsonValue
+ public String getPresentation() {
+ return presentation;
+ }
}